diff --git a/src/util/dnsmasq.c b/src/util/dnsmasq.c index 4f413ade9a..71e960d990 100644 --- a/src/util/dnsmasq.c +++ b/src/util/dnsmasq.c @@ -627,9 +627,9 @@ dnsmasqCapsSetFromBuffer(dnsmasqCapsPtr caps, const char *buf) caps->noRefresh = true; - p = STRSKIP(buf, DNSMASQ_VERSION_STR); - if (!p) + if (!(p = strstr(buf, DNSMASQ_VERSION_STR))) goto fail; + p += sizeof(DNSMASQ_VERSION_STR) - 1; virSkipSpaces(&p); if (virParseVersionString(p, &caps->version, true) < 0) goto fail;