search for: c805819

Displaying 1 result from an estimated 1 matches for "c805819".

Did you mean: 80589
2014 Aug 18
2
[PATCH] daemon: echo-daemon: do not crash on empty string
...leading to dereference null to assign the trailing null. In such situation, create an empty string as return value. --- daemon/echo-daemon.c | 8 ++++++++ generator/actions.ml | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/daemon/echo-daemon.c b/daemon/echo-daemon.c index c805819..d8f1028 100644 --- a/daemon/echo-daemon.c +++ b/daemon/echo-daemon.c @@ -65,6 +65,14 @@ do_echo_daemon (char *const *argv) argv++; } + if (NULL == out) { + /* No strings, so create a new empty array. */ + out = malloc (sizeof (char *)); + if (NULL == out) { + reply_with_pe...