Skip to content

Commit ffbc0da

Browse files
authored
Convert numeric characters to hex (#230)
1 parent 08d2d16 commit ffbc0da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wireshark/source/packet-ja4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,11 @@ void decode_http_lang(wmem_allocator_t *scope, wmem_strbuf_t **out, const char *
372372
if ((g_ascii_isspace(val[i])) || (val[i] == '-')) {
373373
continue;
374374
}
375-
if (g_ascii_isalpha(val[i]) || g_ascii_isdigit(val[i])) {
375+
if (g_ascii_isalpha(val[i])) {
376376
wmem_strbuf_append_c(lang, g_ascii_tolower(val[i]));
377377
count++;
378378
} else {
379-
// Convert a special character to hex
379+
// Convert a non-alpha character to hex
380380
static const char hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
381381
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
382382
wmem_strbuf_append_c(lang, hex[(val[i] >> 4) & 0xF]);

0 commit comments

Comments
 (0)