diff options
author | Thomas Haller <thaller@redhat.com> | 2020-03-24 11:07:32 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-03 11:26:49 +0200 |
commit | 962ad7f8506ed54073b51bb5485484d532ba92c6 (patch) | |
tree | 4ad3ff00c7ec4f367fefd55b3feb86b2d2d33023 /shared | |
parent | 2da092b5922b823b51ec5ff5ad6e8d6d41c82a69 (diff) | |
download | NetworkManager-962ad7f8506ed54073b51bb5485484d532ba92c6.tar.gz |
shared: accept empty buffer for nm_hash_update()
There is no need to reject empty buffers. c_siphash_append() handles
them gracefully.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/nm-glib-aux/nm-hash-utils.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shared/nm-glib-aux/nm-hash-utils.h b/shared/nm-glib-aux/nm-hash-utils.h index 21c5e58416..0e64738fb1 100644 --- a/shared/nm-glib-aux/nm-hash-utils.h +++ b/shared/nm-glib-aux/nm-hash-utils.h @@ -95,8 +95,7 @@ static inline void nm_hash_update (NMHashState *state, const void *ptr, gsize n) { nm_assert (state); - nm_assert (ptr); - nm_assert (n > 0); + nm_assert (n == 0 || ptr); /* Note: the data passed in here might be sensitive data (secrets), * that we should nm_explicty_zero() afterwards. However, since |