summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-06-18 19:30:52 +0200
committerVolker Lendecke <vl@samba.org>2011-06-19 11:08:12 +0200
commitef816f1c4eb84b6ff72abc1106baf7ab3d53482b (patch)
tree9ebe75c1781160961eca93e42db11fc5cf369543
parent36e674c134cadd6cce44e11ea9f8b5e7819904f5 (diff)
downloadsamba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.tar.gz
samba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.tar.bz2
samba-ef816f1c4eb84b6ff72abc1106baf7ab3d53482b.zip
s3: Correctly align even
-rw-r--r--source3/libsmb/clifile.c4
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
*/