int len = strlen(t->string);
for (int i = 0; i < len; i++)
- hash += tolower((unsigned char)t->string[i]);
+ hash += u8_tolower((unsigned char)t->string[i]);
hash = hash % ht->array_size;
return hash;
}
uint16_t u;
for (u = 0; u < fileext->len; u++)
- fileext->ext[u] = tolower(fileext->ext[u]);
+ fileext->ext[u] = u8_tolower(fileext->ext[u]);
if (negate) {
fileext->flags |= DETECT_CONTENT_NEGATED;
for (u = 0; u < cd->content_len; u++)
{
if (isupper(cd->content[u])) {
- cd->content[u] = tolower(cd->content[u]);
+ cd->content[u] = u8_tolower(cd->content[u]);
}
}
for (u = 0; u < cd->content_len; u++)
{
if (isupper(cd->content[u])) {
- cd->content[u] = tolower(cd->content[u]);
+ cd->content[u] = u8_tolower(cd->content[u]);
}
}
for (u = 0; u < cd->content_len; u++)
{
if (isupper(cd->content[u])) {
- cd->content[u] = tolower(cd->content[u]);
+ cd->content[u] = u8_tolower(cd->content[u]);
changed = true;
}
}
for (u = 0; u < cd->content_len; u++)
{
if (islower(cd->content[u])) {
- cd->content[u] = toupper(cd->content[u]);
+ cd->content[u] = u8_toupper(cd->content[u]);
changed = true;
}
}
for (u = 0; u < cd->content_len; u++)
{
if (isupper(cd->content[u])) {
- cd->content[u] = tolower(cd->content[u]);
+ cd->content[u] = u8_tolower(cd->content[u]);
changed = true;
}
}
for (u = 0; u < cd->content_len; u++)
{
if (isupper(cd->content[u])) {
- cd->content[u] = tolower(cd->content[u]);
+ cd->content[u] = u8_tolower(cd->content[u]);
changed = true;
}
}
int len = strlen(f->feature);
for (int i = 0; i < len; i++)
- hash += tolower((unsigned char)f->feature[i]);
+ hash += u8_tolower((unsigned char)f->feature[i]);
return (hash % ht->array_size);
}
temp_str = new_str;
while (*temp_str != '\0') {
- *temp_str = tolower((unsigned char)*temp_str);
+ *temp_str = u8_tolower((unsigned char)*temp_str);
temp_str++;
}
int len = strlen(ct->classtype);
for (i = 0; i < len; i++)
- hash += tolower((unsigned char)(ct->classtype)[i]);
+ hash += u8_tolower((unsigned char)(ct->classtype)[i]);
hash = hash % ht->array_size;
char name[strlen(ct_name) + 1];
size_t s;
for (s = 0; s < strlen(ct_name); s++)
- name[s] = tolower((unsigned char)ct_name[s]);
+ name[s] = u8_tolower((unsigned char)ct_name[s]);
name[s] = '\0';
SCClassConfClasstype ct_lookup = {0, 0, name, NULL };
/* convert to lowercase and store */
uint32_t u;
for (u = 0; u < nlen; u++)
- name[u] = tolower(name[u]);
+ name[u] = u8_tolower(name[u]);
field->name = (uint8_t *)name;
field->name_len = nlen;
tempUrlLen = 0;
for (i = 0; i < tokLen && tok[i] != 0; i++) {
/* url is all lowercase */
- tempUrl[tempUrlLen] = tolower(tok[i]);
+ tempUrl[tempUrlLen] = u8_tolower(tok[i]);
tempUrlLen++;
}
temp_str = new_str;
while (*temp_str != '\0') {
- *temp_str = tolower((unsigned char)*temp_str);
+ *temp_str = u8_tolower((unsigned char)*temp_str);
temp_str++;
}
int len = strlen(ref->system);
for (i = 0; i < len; i++)
- hash += tolower((unsigned char)ref->system[i]);
+ hash += u8_tolower((unsigned char)ref->system[i]);
hash = hash % ht->array_size;
d.nocase = 1;
uint16_t j;
for (j = 0; j < haystack_len; j++) {
- haystack[j] = toupper(haystack[j]);
+ haystack[j] = u8_toupper(haystack[j]);
}
if (SpmTestSearch(&d, matcher) == 0) {
printf(" test %" PRIu32 ": fail (case-insensitive)\n", i);