mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
Fix UBSAN errors
src/encauth/siv/siv.c:164:19: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here src/misc/compare_testvector.c:63:25: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:65:33: note: nonnull attribute specified here
This commit is contained in:
parent
c5607aff6b
commit
471f143078
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ int ltc_compare_testvector(const void* is, const unsigned long is_len, const voi
|
|||
int res = 0;
|
||||
if(is_len != should_len) {
|
||||
res = is_len > should_len ? -1 : 1;
|
||||
} else if (is_len == 0) {
|
||||
} else if (is_len == 0 && (!is || !should)) {
|
||||
res = 0;
|
||||
} else {
|
||||
res = XMEMCMP(is, should, is_len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue