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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user