SCP: One more static analyzer potential issue from Peter Schorn.
This commit is contained in:
parent
2bb502ee64
commit
86e342501d
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue