summaryrefslogtreecommitdiffstats
path: root/contrib/smbfs/lib/smb/nb_name.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid unaligned memory accesses when encoding netbios names in libsmb.ian2015-12-211-19/+13
| | | | | | | | | | | | | | | | The current code for encoding a netbios name converts each byte to a 16-bit value and stores the result by casting a char* to u_short*, resulting in alignment faults on strict-alignment platforms. This change reimplements the encoding routine using only byte accesses to memory. There is no particular reason to work with 16-bit values just because the encoding process creates two bytes of output for every byte of input. Working a byte at at time also avoids endian problems for big-endian platforms. PR: 180438 PR: 189415 Differential Revision: https://reviews.freebsd.org/D4622
* When encoding an smb name, truncate one byte earlier in order than we didrwatson2008-11-021-1/+1
| | | | | | | | | previously in order to ensure it fit properly in the bufer when encoded. This prevents a debugging printf from firing if a source or destination host name for an smb mount exceeds 15 characters. MFC after: 3 days Obtained from: Apple, Inc.
* Remove macrosimura2005-09-191-2/+6
| | | | | htole{s,l,q}, letoh{s,l,q}, htobe{s,l,q}, betoh{s,l,q} and replace it with more standard byteorder macros in our system.
* Import smbfs-1.4.2.sheldonh2001-12-201-4/+5
|
* Import smbfs-1.4.1.sheldonh2001-12-141-0/+198
This is Boris Popov's SMB/CIFS file system implementation for FreeBSD. Obtained from: Boris Popov via ftp://ftp.butya.kz/pub/smbfs/
OpenPOWER on IntegriCloud