summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ed22ab)
raw | patch | inline | side by side (parent: 3ed22ab)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 17 Jul 2009 08:05:38 +0000 (10:05 +0200) | ||
committer | Florian Forster <sifnfors@stud.informatik.uni-erlangen.de> | |
Fri, 17 Jul 2009 12:47:41 +0000 (14:47 +0200) |
The manpage states that 'value' must not be NULL. Anyway, imho, it's still
better to avoid segfaults inside a library.
better to avoid segfaults inside a library.
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index b21188b21abc9fc0654396f26a619e124bafdb9c..36a3a3ef623d00c68f68d6fe1bdc241c89d5890e 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
{
int ret = 0;
+ if (value == NULL)
+ return (-1);
+
switch (option)
{
case PING_OPT_TIMEOUT: