diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-07 17:32:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-07 17:32:44 +0200 |
commit | 2040ccf171404b709acb0ecf1d1f17b87c5d05f0 (patch) | |
tree | ca35ce23720017fee57c9a7c54499be08ab1f3d3 | |
parent | 5e56b378b40dc4dc5557e653487b608fd91fcc26 (diff) |
service: don't accept negative ERRNO= notification messages
-rw-r--r-- | src/core/service.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c index 5c54a34bcd..d5aff99096 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2637,7 +2637,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { if (e) { int status_errno; - if (safe_atoi(e + 6, &status_errno) < 0) + if (safe_atoi(e + 6, &status_errno) < 0 || status_errno < 0) log_warning_unit(u->id, "Failed to parse ERRNO= field in notification message: %s", e); else { log_debug_unit(u->id, "%s: got %s", u->id, e); |