openbsd-ports/net/xl2tpd/patches/patch-xl2tpd-control_c
sthen 0f81196db2 check that argv[1] isn't null before using it in strncmp() to avoid segv;
this file isn't currently built (it needs fmemopen) so no bump.
2013-01-18 22:38:06 +00:00

13 lines
435 B
Plaintext

$OpenBSD: patch-xl2tpd-control_c,v 1.1 2013/01/18 22:38:06 sthen Exp $
--- xl2tpd-control.c.orig Fri Jan 18 22:30:05 2013
+++ xl2tpd-control.c Fri Jan 18 22:31:46 2013
@@ -96,7 +96,7 @@ int main (int argc, char *argv[])
struct command_t* command = NULL;
int i; /* argv iterator */
- if (!strncmp (argv[1], "--help", 6))
+ if (argv[1] && !strncmp (argv[1], "--help", 6))
{
help();
return 0;