projects
/
liboping.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ed22ab
)
src/liboping.c: Let ping_setopt() return -1 if 'value' is NULL.
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.
src/liboping.c
patch
|
blob
|
history
diff --git
a/src/liboping.c
b/src/liboping.c
index
b21188b
..
36a3a3e
100644
(file)
--- a/
src/liboping.c
+++ b/
src/liboping.c
@@
-1054,6
+1054,9
@@
int ping_setopt (pingobj_t *obj, int option, void *value)
{
int ret = 0;
+ if (value == NULL)
+ return (-1);
+
switch (option)
{
case PING_OPT_TIMEOUT: