ソースを参照

Merge pull request #458 from rickvanderzwet/master

check_http: Fix deadloop if header not matched
Sebastian Wolf 6 年 前
コミット
4f114cc400
1 ファイル変更1 行追加1 行削除
  1. 1 1
      plugins/check_http.c

+ 1 - 1
plugins/check_http.c

@@ -1233,7 +1233,7 @@ check_http (void)
 
   /* find header info and null-terminate it */
   header = page;
-  for (;;) {
+  while (strlen(page)) {
     if (!strncmp(page, "\r\n\r\n", 4) || !strncmp(page, "\n\n", 2))
      break;
     while (*page == '\r' || *page == '\n') { ++page; }