Signed-off-by: abhi <abhijith.uwc...@gmail.com> --- libiberty/memcmp.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/libiberty/memcmp.c b/libiberty/memcmp.c index 5b1af020e6c..449434e049e 100644 --- a/libiberty/memcmp.c +++ b/libiberty/memcmp.c @@ -22,6 +22,9 @@ as if comparing unsigned char arrays. int memcmp (const void *str1, const void *str2, size_t count) { + if(!str1 || !str2) + return -1; + register const unsigned char *s1 = (const unsigned char*)str1; register const unsigned char *s2 = (const unsigned char*)str2; -- 2.46.0