by comparing size_t to strlen result
Instead of uint16_t which would loop
Ticket: #5310
char converted = 0;
{
- uint16_t i, x;
+ size_t i, x;
uint8_t bin = 0;
uint8_t escape = 0;
uint8_t binstr[3] = "";
char *copy_str = NULL, *df_opt = NULL;
int seconds_found = 0, count_found = 0, track_found = 0;
int seconds_pos = 0, count_pos = 0;
- uint16_t pos = 0;
+ size_t pos = 0;
int i = 0;
char *saveptr = NULL;
PrefilterStore *ctx = data;
uint32_t hash = strlen(ctx->name);
- uint16_t u;
- for (u = 0; u < strlen(ctx->name); u++) {
+ for (size_t u = 0; u < strlen(ctx->name); u++) {
hash += ctx->name[u];
}
char converted = 0;
{
- uint16_t i, x;
+ size_t i, x;
uint8_t escape = 0;
/* it doesn't matter if we need to escape or not we remove the extra "\" to mimic snort */
UtRegisterTest("DetectMsgParseTest02", DetectMsgParseTest02);
UtRegisterTest("DetectMsgParseTest03", DetectMsgParseTest03);
}
-#endif /* UNITTESTS */
\ No newline at end of file
+#endif /* UNITTESTS */
int second_found = 0, count_found = 0;
int type_found = 0, track_found = 0;
int second_pos = 0, count_pos = 0;
- uint16_t pos = 0;
+ size_t pos = 0;
int i = 0;
copy_str = SCStrdup(rawstr);