Fix a segmentation fault in slowhttptest.
slowhttptest didn't check that the argument passed to freeaddrinfo(3) was not NULL, which resulted in a segmentation fault. OK jca@
This commit is contained in:
parent
2abdb03570
commit
f4a995af19
@ -1,10 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.15 2019/11/02 08:48:07 fcambus Exp $
|
||||
# $OpenBSD: Makefile,v 1.16 2019/11/08 15:59:28 fcambus Exp $
|
||||
|
||||
COMMENT= test tool for slow HTTP reads/posts
|
||||
|
||||
GH_ACCOUNT= shekyan
|
||||
GH_PROJECT= slowhttptest
|
||||
GH_TAGNAME= v1.8.1
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= www security
|
||||
|
||||
|
18
www/slowhttptest/patches/patch-src_slowhttptest_cc
Normal file
18
www/slowhttptest/patches/patch-src_slowhttptest_cc
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-src_slowhttptest_cc,v 1.3 2019/11/08 15:59:28 fcambus Exp $
|
||||
|
||||
Check that the argument passed to freeaddrinfo(3) is not NULL.
|
||||
|
||||
Index: src/slowhttptest.cc
|
||||
--- src/slowhttptest.cc.orig
|
||||
+++ src/slowhttptest.cc
|
||||
@@ -152,7 +152,9 @@ SlowHTTPTest::SlowHTTPTest(int delay, int duration,
|
||||
}
|
||||
|
||||
SlowHTTPTest::~SlowHTTPTest() {
|
||||
- freeaddrinfo(addr_);
|
||||
+ if (addr_) {
|
||||
+ freeaddrinfo(addr_);
|
||||
+ }
|
||||
|
||||
for(std::vector<StatsDumper*>::iterator i = dumpers_.begin();
|
||||
i != dumpers_.end(); ++i) {
|
Loading…
x
Reference in New Issue
Block a user