mirror of https://github.com/BOINC/boinc.git
Lib: prevent dereference of null value
fixes CID 34508 found by Coverity
This commit is contained in:
parent
8e8941c1bf
commit
f6b4e0e2e9
|
@ -97,6 +97,7 @@ bool parse_str(const char* buf, const char* tag, char* dest, int destlen) {
|
||||||
p = strstr(buf, tag);
|
p = strstr(buf, tag);
|
||||||
if (!p) return false;
|
if (!p) return false;
|
||||||
p = strchr(p, '>');
|
p = strchr(p, '>');
|
||||||
|
if (!p) return false;
|
||||||
p++;
|
p++;
|
||||||
const char* q = strchr(p, '<');
|
const char* q = strchr(p, '<');
|
||||||
if (!q) return false;
|
if (!q) return false;
|
||||||
|
|
Loading…
Reference in New Issue