osmo-mslookup-client: fix dereferencing null
Fixes: CID#207543 Change-Id: Ia9ff5b2c767853dd00f577a7bc3583f408e061b5
This commit is contained in:
parent
544b15d3fa
commit
9e533f666d
|
@ -456,6 +456,11 @@ static int socket_read_cb(struct osmo_fd *ofd)
|
||||||
|
|
||||||
rxbuf[rc] = '\0';
|
rxbuf[rc] = '\0';
|
||||||
query_with_timeout = strtok(rxbuf, "\r\n");
|
query_with_timeout = strtok(rxbuf, "\r\n");
|
||||||
|
if (!query_with_timeout) {
|
||||||
|
print_error("ERROR: failed to read line from socket\n");
|
||||||
|
goto close;
|
||||||
|
}
|
||||||
|
|
||||||
at = strchr(query_with_timeout, '@');
|
at = strchr(query_with_timeout, '@');
|
||||||
query_str = at ? at + 1 : query_with_timeout;
|
query_str = at ? at + 1 : query_with_timeout;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue