1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

s3: Correctly align even

This commit is contained in:
Volker Lendecke 2011-06-18 19:30:52 +02:00
parent 36e674c134
commit ef816f1c4e

View File

@ -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
*/