{
DetectEngineThreadKeywordCtxItem *ctx = data;
const char *name = ctx->name;
- uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (ptrdiff_t)ctx->data;
+ uint64_t hash =
+ StringHashDjb2((const uint8_t *)name, (uint32_t)strlen(name)) + (ptrdiff_t)ctx->data;
hash %= ht->array_size;
- return hash;
+ return (uint32_t)hash;
}
static char DetectKeywordCtxCompareFunc(void *data1, uint16_t len1, void *data2, uint16_t len2)
DEBUG_VALIDATE_BUG_ON(wrapper->response == NULL);
if (index == count) {
*buffer = (const uint8_t *)wrapper->response->response;
- *buffer_len = wrapper->response->length;
+ *buffer_len = (uint32_t)wrapper->response->length;
return true;
}
count++;
typedef struct HttpMultiBufItem {
uint8_t *buffer;
- size_t len;
+ uint32_t len;
} HttpMultiBufItem;
typedef struct HttpMultiBufHeaderThreadData {
}
for (size_t i = 0; i < no_of_headers; i++) {
const htp_header_t *h = htp_headers_get_index(headers, i);
- size_t size1 = htp_header_name_len(h);
- size_t size2 = htp_header_value_len(h);
- size_t size = size1 + size2 + 2;
+ uint32_t size1 = (uint32_t)htp_header_name_len(h);
+ uint32_t size2 = (uint32_t)htp_header_value_len(h);
+ uint32_t size = size1 + size2 + 2;
if (hdr_td->items[i].len < size) {
// Use realloc, as this pointer is not freed until HttpMultiBufHeaderThreadDataFree
void *tmp = SCRealloc(hdr_td->items[i].buffer, size);