mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
lib/util: data_blob_append() should not fail if both parts have length=0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15050 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
bc22d5ebf9
commit
8ca99c25ba
@ -229,6 +229,11 @@ _PUBLIC_ bool data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
|
||||
{
|
||||
size_t old_len = blob->length;
|
||||
size_t new_len = old_len + length;
|
||||
|
||||
if (length == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (new_len < length || new_len < old_len) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
^samba4.local.datablob.append_NULL_0
|
||||
^samba4.local.datablob.append_empty_0
|
Loading…
x
Reference in New Issue
Block a user