Snippets for gnutls 3.8.13 from Alpine x86
Sourced from https://build.alpinelinux.org/buildlogs/build-edge-x86/main/gnutls/gnutls-3.8.13-r0.log.
-
privkey_openssl.c:176:37: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 176 | if (pem_header_size > l && | ^ -
output.c:486:47: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'time_t' {aka 'long long int'} [-Wformat=] 486 | addf(str, "error: gmtime_r (%lu)\n", timestamp); | ~~^ ~~~~~~~~~ | | | | | time_t {aka long long int} | long unsigned int | %llu -
output.c:491:47: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'time_t' {aka 'long long int'} [-Wformat=] 491 | addf(str, "error: strftime (%lu)\n", timestamp); | ~~^ ~~~~~~~~~ | | | | | time_t {aka long long int} | long unsigned int | %llu -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
./../gnutls_int.h:263:25: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 263 | if (len < x) { \ | ^ -
x86-common.c:323:12: warning: 'check_fast_pclmul' defined but not used [-Wunused-function] 323 | static int check_fast_pclmul(void) | ^~~~~~~~~~~~~~~~~ -
priority.c:3228:45: warning: comparison of integer expressions of different signedness: 'ptrdiff_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 3228 | if (err_pos && diff > hlen) { | ^ -
crypto-api.c:504:14: warning: no previous prototype for '_gnutls_pkcs7_unpad' [-Wmissing-prototypes] 504 | unsigned int _gnutls_pkcs7_unpad(const uint8_t *block, unsigned int block_size) | ^~~~~~~~~~~~~~~~~~~ -
system/ktls.c:937:39: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 937 | struct msghdr msg = { 0 }; | ^ -
system/ktls.c:1020:31: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 1020 | struct msghdr msg = { 0 }; | ^ -
system/fastopen.c:171:36: warning: leak of file descriptor 'fd' [CWE-775] [-Wanalyzer-fd-leak] 171 | if (ret >= 0 || (ret == -1 && errno != EAGAIN)) { | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ -
serv.c:1149:34: warning: leak of file descriptor '((listener_item)*(const void *)((const void *)j)).fd' [CWE-775] [-Wanalyzer-fd-leak] 1149 | int last_alert = gnutls_alert_get(session); | ^~~~~~~~~~~~~~~~~~~~~~~~~ -
serv.c:1488:31: warning: leak of file descriptor '((listener_item)*(const void *)((const void *)j)).fd' [CWE-775] [-Wanalyzer-fd-leak] 1488 | ret = gnutls_alert_send_appropriate(j->tls_session, r); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
serv.c:1838:77: warning: leak of file descriptor '((listener_item)*(const void *)((const void *)j)).fd' [CWE-775] [-Wanalyzer-fd-leak] 1837 | j->http_request | ~~~~~~~~~~~~~~~ 1838 | [0] = 0; | ~~~~^~~ -
serv.c:1844:60: warning: leak of file descriptor '((listener_item)*(const void *)((const void *)j)).fd' [CWE-775] [-Wanalyzer-fd-leak] 1844 | j->http_request[0] = 0; | ~~~~~~~~~~~~~~~~~~~^~~ -
pkcs11/pkcs11-mock5.c:194:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 194 | dbg("pkcs11-mock5: %s #%lu intercept -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 195 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
pkcs11/pkcs11-mock5.c:198:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 198 | dbg("pkcs11-mock5: %s #%lu pass through -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
pkcs11/pkcs11-mock5.c:194:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 194 | dbg("pkcs11-mock5: %s #%lu intercept -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 195 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
pkcs11/pkcs11-mock5.c:198:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 198 | dbg("pkcs11-mock5: %s #%lu pass through -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
pkcs11/pkcs11-mock5.c:194:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 194 | dbg("pkcs11-mock5: %s #%lu intercept -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 195 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
pkcs11/pkcs11-mock5.c:198:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 198 | dbg("pkcs11-mock5: %s #%lu pass through -> %ld\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | #func_name, rule->call_count, (long)result); \ | ~~~~~~~~~~~~~~~~ | | | uint64_t {aka long long unsigned int} -
tcp.c:39:15: warning: 'connect' on possibly invalid file descriptor 'sd' [-Wanalyzer-fd-use-without-check] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
udp.c:52:15: warning: 'connect' on possibly invalid file descriptor 'sd' [-Wanalyzer-fd-use-without-check] 52 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
ex-serv-dtls.c:125:9: warning: 'bind' on possibly invalid file descriptor 'listen_sd' [-Wanalyzer-fd-use-without-check] 125 | bind(listen_sd, (struct sockaddr *)&sa_serv, sizeof(sa_serv)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
ex-serv-psk.c:140:36: warning: use of uninitialized value 'sa_cli.sin_port' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 140 | ntohs(sa_cli.sin_port)); | ~~~~~~^~~~~~~~~ -
ex-serv-anon.c:88:36: warning: use of uninitialized value 'sa_cli.sin_port' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 88 | ntohs(sa_cli.sin_port)); | ~~~~~~^~~~~~~~~ -
ex-serv-x509.c:142:36: warning: use of uninitialized value 'sa_cli.sin_port' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 142 | ntohs(sa_cli.sin_port)); | ~~~~~~^~~~~~~~~ -
tlsproxy/tlsproxy.c:232:41: warning: leak of file descriptor 'listenfd' [CWE-775] [-Wanalyzer-fd-leak] 232 | fprintf(stderr, "Accept failed\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
tlsproxy/tlsproxy.c:241:28: warning: leak of file descriptor 'listenfd' [CWE-775] [-Wanalyzer-fd-leak] 241 | if (ret < 0) | ^ -
tlsproxy/tlsproxy.c:254:17: warning: leak of file descriptor 'fd' [CWE-775] [-Wanalyzer-fd-leak] 254 | close(listenfd); | ^~~~~~~~~~~~~~~ -
/usr/include/fortify/unistd.h:62:16: warning: argument 1 is null but the corresponding size argument 2 value is [1, 2147483646] [-Wnonnull] 62 | return __orig_getcwd(__s, __l); | ^~~~~~~~~~~~~~~~~~~~~~~ -
/usr/include/fortify/unistd.h:62:16: warning: argument 1 is null but the corresponding size argument 2 value is [1, 2147483645] [-Wnonnull] 62 | return __orig_getcwd(__s, __l); | ^~~~~~~~~~~~~~~~~~~~~~~ -
test-strnlen.c:45:11: warning: 'strnlen' specified bound 1048576 exceeds source size 1 [-Wstringop-overread] 45 | ASSERT (strnlen ("", 0x100000) == 0); | ^~~~~~~~~~~~~~~~~~~~~~ -
pkcs12_s2k.c:126:35: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 126 | data.data = values[x]; | ^ -
pkcs12_s2k.c:152:27: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 152 | data.data = tv[i].key; | ^ -
x509cert-tl.c:134:9: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (603 chars into 602 available) [-Wunterminated-string-initialization] 134 | "\x30\x82\x02\x56\x30\x82\x01\xc1\xa0\x03\x02\x01\x02\x02\x04\x46" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
x509cert-ct.c:143:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 143 | "\xdd\xeb\x1d\x2b\x7a\x0d\x4f\xa6\x20\x8b\x81\xad\x81\x68\x70\x7e" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
x509cert-ct.c:154:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 154 | "\xa4\xb9\x09\x90\xb4\x18\x58\x14\x87\xbb\x13\xa2\xcc\x67\x70\x0a" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
x509cert-ct.c:165:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 165 | "\xee\x4b\xbd\xb7\x75\xce\x60\xba\xe1\x42\x69\x1f\xab\xe1\x9e\x66" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
x509cert-ct.c:176:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 176 | "\xbc\x78\xe1\xdf\xc5\xf6\x3c\x68\x46\x49\x33\x4d\xa1\x0f\xa1\x5f" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
time.c:70:64: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'time_t' {aka 'long long int'} [-Wformat=] 70 | fprintf(stderr, "got: %lu, expected: %lu\n", | ~~^ | | | long unsigned int | %llu 71 | (unsigned long)t, general_time_tests[i].utime); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | time_t {aka long long int} -
time.c:81:64: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'time_t' {aka 'long long int'} [-Wformat=] 81 | fprintf(stderr, "got: %lu, expected: %lu\n", | ~~^ | | | long unsigned int | %llu 82 | (unsigned long)t, utc_time_tests[i].utime); | ~~~~~~~~~~~~~~~~~~~~~~~ | | | time_t {aka long long int} -
priority-init2.c:109:65: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 109 | if (ep - test->add_prio != | ^~ -
set-default-prio.c:110:65: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 110 | if (ep - test->add_prio != | ^~ -
client-fastopen.c:313:1: warning: leak of file descriptor 'listener' [CWE-775] [-Wanalyzer-fd-leak] 313 | } | ^ -
ocsp.c:893:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 893 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 894 | strlen(REQ1INFO), REQ1INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
ocsp.c:1042:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1042 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 1043 | strlen(REQ1INFO), REQ1INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
ocsp.c:1130:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1130 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 1131 | strlen(REQ1INFO), REQ1INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
ocsp.c:1227:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1227 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 1228 | strlen(RESP1INFO), RESP1INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
ocsp.c:1249:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1249 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 1250 | strlen(RESP2INFO), RESP2INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
ocsp.c:1278:41: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1278 | printf("expected (len %ld):\n%s\ngot (len %d):\n%.*s\n", | ~~^ | | | long int | %d 1279 | strlen(RESP3INFO), RESP3INFO, (int)d.size, (int)d.size, | ~~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} -
tls13/supported_versions.c:138:29: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 138 | if (pos + 1 > total) \ | ^ -
tls13/supported_versions.c:127:29: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 127 | if (pos + 2 > total) \ | ^ -
tls13/supported_versions.c:138:29: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 138 | if (pos + 1 > total) \ | ^ -
tls13/supported_versions.c:197:20: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 197 | while (pos < msg->size) { | ^ -
tls13/supported_versions.c:200:29: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 200 | if (pos + 4 > msg->size) | ^ -
tls13/supported_versions.c:127:29: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 127 | if (pos + 2 > total) \ | ^ -
tls13/supported_versions.c:217:34: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'unsigned int' [-Wsign-compare] 217 | if (size > msg->size + pos) { | ^ -
ktls_utils.h:106:12: warning: leak of file descriptor 'listener' [CWE-775] [-Wanalyzer-fd-leak] 106 | if (*server_fd < 0) { | ^