diff options
author | Toni <matzeton@googlemail.com> | 2022-09-18 12:40:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-18 12:40:49 +0200 |
commit | 174cd739dbb1358ab012c4779e42e0221bef835c (patch) | |
tree | f6ace548c3b35b1d21cf33081d6838c11c182477 /src | |
parent | 48d00eae355b1143e1850caf5af563d67c30c96b (diff) |
Fix warnings on OpenWrt CCs, caused by the memcpy builtin. (#1741)
In file included from ../include/ndpi_includes.h:31,
from ../include/ndpi_main.h:27,
from ../include/ndpi_api.h:28,
from protocols/quic.c:27:
In function 'memcpy',
inlined from 'tls13_hkdf_expand_label_context' at protocols/quic.c:473:5,
inlined from 'tls13_hkdf_expand_label' at protocols/quic.c:498:10,
inlined from 'quic_hkdf_expand_label.constprop' at protocols/quic.c:512:6:
/home/build/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/include/fortify/string.h:53:16: error: argument 2 null where non-null expected [-Werror=nonnull]
53 | return __builtin_memcpy(__od, __os, __n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
protocols/quic.c: In function 'quic_hkdf_expand_label.constprop':
/home/build/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/include/fortify/string.h:53:16: note: in a call to built-in function '__builtin_memcpy'
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-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 7889dad4d..4909846b1 100644 --- a/src/lib/protocols/quic.c +++ b/src/lib/protocols/quic.c @@ -469,7 +469,7 @@ static int tls13_hkdf_expand_label_context(struct ndpi_detection_module_struct * memcpy(&info_data[info_len], &context_length, 1); info_len += 1; - if(context_length) { + if(context_length && context_hash != NULL) { memcpy(&info_data[info_len], context_hash, context_length); info_len += context_length; } |