diff options
| author | Alexey Kodanev <aleksei.kodanev@bell-sw.com> | 2022-04-21 14:59:01 +0000 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2022-05-04 14:57:13 -0400 |
| commit | 6aac5959bbb6adbe5f061a7f95139ab794bcfda7 (patch) | |
| tree | 3068abc4ef712abfa69473e5ee3036d7e59c6574 /Cryptlib/OpenSSL | |
| parent | 4df989abdf893326cb866e153b24ddaf2b29d0d7 (diff) | |
| download | efi-boot-shim-6aac5959bbb6adbe5f061a7f95139ab794bcfda7.tar.gz efi-boot-shim-6aac5959bbb6adbe5f061a7f95139ab794bcfda7.zip | |
test-str.c: fix gcc warnings with FORTIFY_SOURCE enabled
* test_strncpy(). The test intentionally copies less than the total length
of the string, so it looks like there is nothing we can do about it in
the test other than explicitly ignoring the warnings.
inlined from ‘test_strncpy’ at test-str.c:943:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’
output may be truncated copying 1 byte from a string of length 8191 [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
* test_strcat(). The fix for the warning below is to avoid using overlapping
buffers in src and dst. This is actually a requirement for both strcat() and
strncpy(), so fix both functions.
inlined from ‘test_strcat’ at test-str.c:1052:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:128:10: error: ‘__builtin___strcat_chk’
accessing 4097 or more bytes at offsets 4096 and 0 may overlap 1 byte at offset 4096 [-Werror=restrict]
128 | return __builtin___strcat_chk (__dest, __src, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
Diffstat (limited to 'Cryptlib/OpenSSL')
0 files changed, 0 insertions, 0 deletions
