Skip to content

Commit c7a8243

Browse files
EvgeniiMekhanikKutumov
authored andcommitted
Fix ja5h calculation.
1 parent dc9631c commit c7a8243

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/ja5.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ typedef struct {
8282
unsigned short elliptic_curve_hash;
8383
} TlsJa5t;
8484

85-
#define HTTP_JA5H_CALC_NUM(val, max, num) \
86-
({ \
87-
typeof(max) x = (val) < (max) ? (val) + (num) : (val); \
88-
x; \
85+
#define HTTP_JA5H_CALC_NUM(val, max, num) \
86+
({ \
87+
typeof(max) x = (val) + (num) < (max) ? (val) + (num) : (max); \
88+
x; \
8989
})
9090

9191
#define HTTP_JA5H_REQ_CALC_NUM(req, name, max, num) \

0 commit comments

Comments
 (0)