1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

back to c89

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588989 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2014-04-21 21:31:42 +00:00
parent c51e4d9cbc
commit 06189fe5af

View File

@@ -320,10 +320,11 @@ static int req_parseargs(lua_State *L)
/* ap_lua_binstrstr: Binary strstr function for uploaded data with NULL bytes */
static char* ap_lua_binstrstr (const char * haystack, size_t hsize, const char* needle, size_t nsize)
{
size_t p;
if (haystack == NULL) return NULL;
if (needle == NULL) return NULL;
if (hsize < nsize) return NULL;
for (size_t p = 0; p <= (hsize - nsize); ++p) {
for (p = 0; p <= (hsize - nsize); ++p) {
if (memcmp(haystack + p, needle, nsize) == 0) {
return (char*) (haystack + p);
}