diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-04-18 20:54:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 20:54:13 +0200 |
commit | 739dfc54b06a6995bc4d286eb400e2675b480feb (patch) | |
tree | 3c9692b4f133604793534ab11faf39f84b3b802b | |
parent | 8b2c9860be8b0663bfe9fc3b6defc041bb90e5b2 (diff) |
Kerberos: fix Undefined-shift error (#1516)
Similar to the error fixed in 4775be3d
Found by oss-fuzz.
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46713
-rw-r--r-- | src/lib/protocols/kerberos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c index 4c1deda90..e1297d230 100644 --- a/src/lib/protocols/kerberos.c +++ b/src/lib/protocols/kerberos.c @@ -166,7 +166,7 @@ static int krb_decode_asn1_int_type(struct ndpi_detection_module_struct *ndpi_st *out = 0; for (; i < length; ++i) { - *out |= packet->payload[*kasn1_offset + i] << (length - i - 1) * 8; + *out |= (unsigned int)packet->payload[*kasn1_offset + i] << (length - i - 1) * 8; } *kasn1_offset += i; } |