diff options
author | Volker Lendecke <vl@samba.org> | 2011-06-18 19:30:52 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-06-19 11:08:12 +0200 |
commit | ef816f1c4eb84b6ff72abc1106baf7ab3d53482b (patch) | |
tree | 9ebe75c1781160961eca93e42db11fc5cf369543 /source3 | |
parent | 36e674c134cadd6cce44e11ea9f8b5e7819904f5 (diff) | |
download | samba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.tar.gz samba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.tar.bz2 samba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.zip |
s3: Correctly align even
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clifile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 900c04a6ef..5f93ced6af 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -48,7 +48,9 @@ static uint8_t *internal_bytes_push_str(uint8_t *buf, bool ucs2, buflen = talloc_get_size(buf); - if (align_odd && ucs2 && (buflen % 2 == 0)) { + if (ucs2 && + ((align_odd && (buflen % 2 == 0)) || + (!align_odd && (buflen % 2 == 1)))) { /* * We're pushing into an SMB buffer, align odd */ |