mirror of
https://github.com/simh/simh.git
synced 2026-04-26 03:57:11 +00:00
SCP: One more static analyzer potential issue from Peter Schorn.
This commit is contained in:
@@ -558,6 +558,8 @@ if ((port != NULL) && (port_len != 0))
|
|||||||
if ((cptr == NULL) || (*cptr == 0)) {
|
if ((cptr == NULL) || (*cptr == 0)) {
|
||||||
if (((default_host == NULL) || (*default_host == 0)) || ((default_port == NULL) || (*default_port == 0)))
|
if (((default_host == NULL) || (*default_host == 0)) || ((default_port == NULL) || (*default_port == 0)))
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
|
if ((host == NULL) || (port == NULL))
|
||||||
|
return SCPE_ARG; /* no place */
|
||||||
if ((strlen(default_host) >= host_len) || (strlen(default_port) >= port_len))
|
if ((strlen(default_host) >= host_len) || (strlen(default_port) >= port_len))
|
||||||
return SCPE_ARG; /* no room */
|
return SCPE_ARG; /* no room */
|
||||||
strcpy (host, default_host);
|
strcpy (host, default_host);
|
||||||
|
|||||||
Reference in New Issue
Block a user