diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2020-07-30 12:06:10 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2020-08-03 02:51:35 +0000 |
commit | 9148f38c203c3481a43ef6d39ea9313dfa1c1bea (patch) | |
tree | 48aba4c058649c95f4cde3f16e92a071a77d2d60 /python/samba/tests/py_credentials.py | |
parent | 9bf331b46a70189f2f63a5223a31eae64a9854db (diff) | |
download | samba-9148f38c203c3481a43ef6d39ea9313dfa1c1bea.tar.gz |
ndr: avoid excessive reallocing in pull_string_array
Before, talloc_realloc() was being called n times for an array of
length n. This could be very expensive on long string arrays since it
is reasonable to assume each realloc moves O(n) bytes.
This addresses at least one OSS-Fuzz bug, making a timing out test case
100 times faster. Credit to OSS-Fuzz.
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19706
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/tests/py_credentials.py')
0 files changed, 0 insertions, 0 deletions