- fix some read beyond errors found thanks to run-tests -m
CURL_LIBS=`$CURL_CONFIG --libs`
- CURL_ZLIB= `$CURL_CONFIG --features | $EGREP libz`
+ CURL_ZLIB=`$CURL_CONFIG --features | $EGREP libz`
if test "$CURL_ZLIB" = "libz"; then
AC_DEFINE([HTTP_HAVE_CURL_ZLIB], [1], [ ])
fi
if ( (found = strstr(methods, method)) &&
(found == method || !isalpha(found[-1])) &&
- (!isalpha(found[strlen(method) + 1]))) {
+ (strlen(found) >= strlen(method) && !isalpha(found[strlen(method)]))) {
return SUCCESS;
}
return FAILURE;
header_len = strlen(header) + 1;
}
line = header;
-
- while (header_len >= (size_t) (line - begin)) {
+
+ if (header_len) do {
int value_len = 0;
/* note: valgrind may choke on that -- should be safe though */
switch (*line++)
case 0:
--value_len; /* we don't have CR so value length is one char less */
case '\n':
- if ((!(*line - 1)) || ((*line != ' ') && (*line != '\t'))) {
+ if ((!*(line - 1)) || ((*line != ' ') && (*line != '\t'))) {
http_info i;
/* response/request line */
}
break;
}
- }
+ } while (header_len > (size_t) (line - begin));
+
return SUCCESS;
}
/* }}} */
<?php
echo "-TEST\n";
+set_time_limit(0);
error_reporting(E_ALL);
$s = '';