libinjection sync

This commit is contained in:
Nick Galbreath
2013-10-12 22:04:16 +09:00
parent f52242a013
commit fcb6dc13ed
2 changed files with 2 additions and 18 deletions

View File

@@ -19,7 +19,7 @@ extern "C" {
* See python's normalized version
* http://www.python.org/dev/peps/pep-0386/#normalizedversion
*/
#define LIBINJECTION_VERSION "3.7.0"
#define LIBINJECTION_VERSION "3.7.1"
/**
* Libinjection's sqli module makes a "normalized"

View File

@@ -119,22 +119,6 @@ memchr2(const char *haystack, size_t haystack_len, char c0, char c1)
return NULL;
}
/**
* memchr might not exist on some systems
*/
static const char*
my_memchr(const char* haystack, size_t hlen, int needle)
{
const char* cur;
const char* last = haystack + hlen;
for (cur = haystack; cur < last; ++cur) {
if (cur[0] == needle) {
return cur;
}
}
return NULL;
}
/**
* memmem might not exist on some systems
*/
@@ -885,7 +869,7 @@ static size_t parse_bword(struct libinjection_sqli_state * sf)
{
const char *cs = sf->s;
size_t pos = sf->pos;
const char* endptr = my_memchr(cs + pos, sf->slen - pos, ']');
const char* endptr = (const char*) memchr(cs + pos, ']', sf->slen - pos);
if (endptr == NULL) {
st_assign(sf->current, TYPE_BAREWORD, pos, sf->slen - pos, cs + pos);
return sf->slen;