summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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
*/