chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shared, libsystemd-daemon: check for empty strings in strto*l conversions
[elogind.git]
/
src
/
libsystemd-daemon
/
sd-daemon.c
diff --git
a/src/libsystemd-daemon/sd-daemon.c
b/src/libsystemd-daemon/sd-daemon.c
index 863ac7529060d7560e765aeb612dcebc422fb259..480db3bbb9dab9eb85a8497abe1a32d97c459afe 100644
(file)
--- a/
src/libsystemd-daemon/sd-daemon.c
+++ b/
src/libsystemd-daemon/sd-daemon.c
@@
-88,7
+88,7
@@
_sd_export_ int sd_listen_fds(int unset_environment) {
goto finish;
}
goto finish;
}
- if (!p || *p || l <= 0) {
+ if (!p ||
p == e ||
*p || l <= 0) {
r = -EINVAL;
goto finish;
}
r = -EINVAL;
goto finish;
}
@@
-112,7
+112,7
@@
_sd_export_ int sd_listen_fds(int unset_environment) {
goto finish;
}
goto finish;
}
- if (!p || *p) {
+ if (!p ||
p == e ||
*p) {
r = -EINVAL;
goto finish;
}
r = -EINVAL;
goto finish;
}