mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
util:datablob: data_blob_pad checks its alignment assumption
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15756 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Dec 20 07:59:51 UTC 2024 on atb-devel-224
This commit is contained in:
parent
929f4d0ca5
commit
8b84282008
@ -290,7 +290,7 @@ _PUBLIC_ bool data_blob_pad(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
|
||||
size_t old_len = blob->length;
|
||||
size_t new_len = (old_len + pad - 1) & ~(pad - 1);
|
||||
|
||||
if (new_len < old_len) {
|
||||
if (new_len < old_len || (pad & (pad - 1)) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user