From: Dmitry V. Levin Date: Fri, 25 Aug 2006 07:59:19 +0000 (+0400) Subject: arpsend: Fix segfault when parsing long options X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=8ae927daa4a5c391e02bf15db02fde1ec92365f5 arpsend: Fix segfault when parsing long options parse_options(): NULL-terminate long_options array. Signed-off-by: Dmitry V. Levin --- Index: vzctl-3.0.11/src/arpsend.c =================================================================== --- vzctl-3.0.11.orig/src/arpsend.c +++ vzctl-3.0.11/src/arpsend.c @@ -165,7 +165,8 @@ void parse_options (int argc, char **arg {"trg-arp", 1, NULL, 'T'}, {"src-ip", 1, NULL, 'i'}, {"trg-ip", 1, NULL, 'e'}, - {"at-once", 0, NULL, 'o'} + {"at-once", 0, NULL, 'o'}, + {NULL, 0, NULL, 0} }; while ((c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1)