From ef816f1c4eb84b6ff72abc1106baf7ab3d53482b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 18 Jun 2011 19:30:52 +0200 Subject: s3: Correctly align even --- source3/libsmb/clifile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- cgit