Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2015 17:17:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-fs@FreeBSD.org
Subject:   [Bug 180438] [smbfs] [patch] mount_smbfs fails on arm because of wrong endianess assumption in libsmb
Message-ID:  <bug-180438-3630-fI9VcmZhwk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-180438-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-180438-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=180438

--- Comment #3 from commit-hook@freebsd.org ---
A commit references this bug:

Author: ian
Date: Mon Dec 21 17:17:00 UTC 2015
New revision: 292552
URL: https://svnweb.freebsd.org/changeset/base/292552

Log:
  Avoid unaligned memory accesses when encoding netbios names in libsmb.

  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

Changes:
  head/contrib/smbfs/lib/smb/nb_name.c

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-180438-3630-fI9VcmZhwk>