OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] arpsend: Fix segfault when parsing long options
[PATCH] arpsend: Fix segfault when parsing long options [message #5633] Thu, 24 August 2006 21:51
ldv is currently offline  ldv
Messages: 24
Registered: June 2006
Junior Member
arpsend: parse_options(): NULL-terminate long_options array.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
src/arpsend.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/arpsend.c b/src/arpsend.c
index 2fe1226..7e1e032 100644
--- a/src/arpsend.c
+++ b/src/arpsend.c
@@ -165,7 +165,8 @@ #define read_ip(addr) \
{"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)
--
ldv
Previous Topic: Q: hardcoded parameters and restrictions
Next Topic: [PATCH] vzctl enter: Really add PATH to shell environment
Goto Forum:
  


Current Time: Sun Aug 03 01:07:28 GMT 2025

Total time taken to generate the page: 0.54426 seconds