openbsd-ports/security/arirang/patches/patch-ariruby_c
sthen 22b70aa246 - update to 2.02, from jung (maintainer).
- add a patch to fix a user-after-free, maintainer ok
2011-04-28 16:17:21 +00:00

24 lines
705 B
Plaintext

$OpenBSD: patch-ariruby_c,v 1.1 2011/04/28 16:17:21 sthen Exp $
--- ariruby.c.orig Thu Apr 28 16:38:21 2011
+++ ariruby.c Thu Apr 28 16:38:32 2011
@@ -519,9 +519,6 @@ rubyscanW(unsigned long host, unsigned int port, unsig
if (sendbuf != NULL)
free(sendbuf);
- if (headbuf != NULL)
- free(headbuf);
-
if (nb == -1 || nb == -2) {
#if !(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__))
alarm(0);
@@ -543,6 +540,9 @@ rubyscanW(unsigned long host, unsigned int port, unsig
if (!pflags)
exit(0);
}
+
+ if (headbuf != NULL)
+ free(headbuf);
if (sslflags)
ssl_free(ctx, ssl);