mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
Attempt to fix Coverity CID #87810 Dereference null return value
Fixes, or rather works around the Coverity warning of possible NULL pointer dereference. (Not an error.) Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
5d5075954e
commit
216701ce3c
1 file changed
+2
@@ -328,6 +328,8 @@ int svc_register(int type, char *line, char *username)
|
|||||||
/* Example: inetd ssh@eth0:222/tcp */
|
/* Example: inetd ssh@eth0:222/tcp */
|
||||||
if (service) {
|
if (service) {
|
||||||
proto = strchr(service, '/');
|
proto = strchr(service, '/');
|
||||||
|
if (!proto)
|
||||||
|
goto incomplete;
|
||||||
*proto++ = 0;
|
*proto++ = 0;
|
||||||
|
|
||||||
port = strchr(service, ':');
|
port = strchr(service, ':');
|
||||||
|
|||||||
Reference in new issue
Block a user