diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-05-29 22:39:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-29 22:39:48 +0200 |
commit | a9d7cc4841ea098074b3dc0b42b7b6e73d4d8cd9 (patch) | |
tree | a15ea0890da76b5c723cd3f07e77c74a25cf9efd /src/lib/protocols/quic.c | |
parent | 9c1a53f39f9cadb1961621be689545af1eda67e1 (diff) |
Fix dissection of IPv4 header (#1561)
See: https://github.com/ntop/nDPI/runs/6643914510?check_suite_focus=true
Convert al the `MIN(a,b)` calls to `ndpi_min(a,b)`
Diffstat (limited to 'src/lib/protocols/quic.c')
-rw-r--r-- | src/lib/protocols/quic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c index a8b2827f2..d3512cd9b 100644 --- a/src/lib/protocols/quic.c +++ b/src/lib/protocols/quic.c @@ -375,7 +375,7 @@ static gcry_error_t hkdf_expand(int hashalgo, const uint8_t *prk, uint32_t prk_l gcry_md_write(h, &c, sizeof(c)); /* constant 0x01..N */ memcpy(lastoutput, gcry_md_read(h, hashalgo), hash_len); - memcpy(out + offset, lastoutput, MIN(hash_len, out_len - offset)); + memcpy(out + offset, lastoutput, ndpi_min(hash_len, out_len - offset)); } gcry_md_close(h); |