diff options
author | Azat Khuzhin <azat@libevent.org> | 2020-06-25 09:59:35 +0300 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2020-06-25 09:59:35 +0300 |
commit | 6f152befb4523fd2e57c1a937e590f8ff87b7f15 (patch) | |
tree | 89d54f7a9103605d002a860b75808136d556ae1d /test | |
parent | 37dbb3508099d49748453166c1ee9ef1603fcf3a (diff) | |
download | libevent-6f152befb4523fd2e57c1a937e590f8ff87b7f15.tar.gz |
test: do not pass NULL to memcmp() in evbuffer_datacmp() helper
Fixes:
runtime error: null pointer passed as argument 2, which is declared to never be null
Diffstat (limited to 'test')
-rw-r--r-- | test/regress_http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/regress_http.c b/test/regress_http.c index 279dcd4d..4353ca5f 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -267,6 +267,8 @@ evbuffer_datacmp(struct evbuffer *buf, const char *s) return -1; d = evbuffer_pullup(buf, s_sz); + if (!d) + d = (unsigned char *)""; if ((r = memcmp(d, s, s_sz))) return r; |