X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_http.c;h=abd8aa8dadf968f45a2fcf22ef1e02a823c5af12;hb=b699c208e858032ffd1218a4e22cb822895fa097;hp=188e9ec022f5a7f2634e7936d2f4abf2977ae116;hpb=74e1a4c244e1915e5b63d4272a4942f5fbd3df78;p=nagiosplug.git diff --git a/plugins/check_http.c b/plugins/check_http.c index 188e9ec..abd8aa8 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1094,9 +1094,8 @@ redir (char *pos, char *status_line) die (STATE_UNKNOWN, _("Could not allocate url\n")); while (pos) { - - if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { - + sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i); + if (i == 0) { pos += (size_t) strcspn (pos, "\r\n"); pos += (size_t) strspn (pos, "\r\n"); if (strlen(pos) == 0)