diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2020-08-28 13:04:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 13:04:26 +0200 |
commit | 8bf95b6198f1c1c04b9f783540b275282720e258 (patch) | |
tree | 37373dfd060023153fbe0670985cf8d31dec0bef /src/lib/protocols | |
parent | 1810281d7fecaf8e071eaa878c9237a33e633b2a (diff) | |
parent | bf9dbd6ccfa9c298f0fca26af2e73453bbaa1194 (diff) |
Merge pull request #996 from lnslbrty/fix/travis-ci
Fix travis-ci related errors.
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/dnp3.c | 3 | ||||
-rw-r--r-- | src/lib/protocols/quic.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/protocols/dnp3.c b/src/lib/protocols/dnp3.c index 31fc55094..842e3be0f 100644 --- a/src/lib/protocols/dnp3.c +++ b/src/lib/protocols/dnp3.c @@ -21,14 +21,13 @@ */ #include "ndpi_protocol_ids.h" +#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNP3 #include "ndpi_api.h" /* https://www.ixiacom.com/company/blog/scada-distributed-network-protocol-dnp3 */ -#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNP3 - /* ******************************************************** */ void ndpi_search_dnp3_tcp(struct ndpi_detection_module_struct *ndpi_struct, diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c index d40b4219b..905a93543 100644 --- a/src/lib/protocols/quic.c +++ b/src/lib/protocols/quic.c @@ -286,7 +286,9 @@ static gcry_error_t hkdf_expand(int hashalgo, const uint8_t *prk, uint32_t prk_l gcry_md_write(h, lastoutput, hash_len); /* T(1..N) */ } gcry_md_write(h, info, info_len); /* info */ - gcry_md_putc(h, (uint8_t) (offset / hash_len + 1)); /* constant 0x01..N */ + + uint8_t c = offset / hash_len + 1; + 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)); |