Skip to content

Conversation

@kareem-wolfssl
Copy link
Contributor

@kareem-wolfssl kareem-wolfssl commented May 15, 2024

Description

Fixes zd#17977

Credit to wolfSentry for the fix

Customer to confirm fix, please do not merge before then

Testing

Built in tests with --enable-dtlscid --enable-tls13 --enable-tlsx --enable-dtls13 --enable-dtls which should cover all cases

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl requested a review from douzzer May 15, 2024 19:04
@kareem-wolfssl kareem-wolfssl self-assigned this May 15, 2024
#pragma warning(disable: 4200)
#endif
byte hashSigAlgo[]; /* sig/algo to offer */
byte hashSigAlgo[WOLFSSL_FLEXIBLE_ARRAY_SIZE]; /* sig/algo to offer */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clang-tidy-defaults] [7 of 7] [ac3063c1e8]
    configure...   real 0m18.881s  user 0m5.668s  sys 0m2.801s
    build..../wolfssl/internal.h:3178:29: warning: zero size arrays are an extension [clang-diagnostic-zero-length-array]
byte        hashSigAlgo[WOLFSSL_FLEXIBLE_ARRAY_SIZE]; /* sig/algo to offer */
^
/tmp/workspace/PRB-multi-test-script/wolfssl/./wolfssl/wolfcrypt/wc_port.h:1276:41: note: expanded from macro 'WOLFSSL_FLEXIBLE_ARRAY_SIZE'
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE 0
^
./wolfssl/internal.h:3356:17: warning: zero size arrays are an extension [clang-diagnostic-zero-length-array]
byte   data[WOLFSSL_FLEXIBLE_ARRAY_SIZE];
^
/tmp/workspace/PRB-multi-test-script/wolfssl/./wolfssl/wolfcrypt/wc_port.h:1276:41: note: expanded from macro 'WOLFSSL_FLEXIBLE_ARRAY_SIZE'
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE 0
^
./wolfssl/internal.h:5216:14: warning: zero size arrays are an extension [clang-diagnostic-zero-length-array]
byte buf[WOLFSSL_FLEXIBLE_ARRAY_SIZE];
^
/tmp/workspace/PRB-multi-test-script/wolfssl/./wolfssl/wolfcrypt/wc_port.h:1276:41: note: expanded from macro 'WOLFSSL_FLEXIBLE_ARRAY_SIZE'
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE 0
^
make[2]: *** [Makefile:7277: wolfcrypt/src/src_libwolfssl_la-asn.lo] Error 1
make[1]: *** [Makefile:8414: all-recursive] Error 1
make: *** [Makefile:5059: all] Error 2
   real 2m34.598s  user 2m0.813s  sys 0m2.866s
    clang-tidy-defaults fail_analytic_build
    failed config: 'CPPFLAGS=-DKEEP_OUR_CERT -DKEEP_PEER_CERT -DWOLFSSL_ALT_NAMES -DNO_WOLFSSL_CIPHER_SUITE_TEST -DWOLFSSL_OLD_PRIME_CHECK -pedantic -DSP_ALLOC -DWOLFSSL_CLANG_TIDY' 'CC=/tmp/workspace/PRB-multi-test-script/testing/git-hooks/clang-tidy-builder.sh' 'CLANG=/usr/lib/llvm-14/bin/clang-14' 'CFLAGS=-Wunreachable-code-aggressive -Wthread-safety -Wloop-analysis -Wenum-compare-conditional -fcolor-diagnostics -fcomplete-member-pointers -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -g -fdebug-types-section -Wunreachable-code-break -Wunreachable-code-return -Wimplicit-fallthrough'
final tally: 6 of 7 checks succeeded, 0 skipped, 0 forced, and 1 failed, for ac3063c1e8.
exiting with status 2

Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync with latest from wolfSentry.

Comment on lines 1378 to 1386
#if defined(__STRICT_ANSI__)
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE 1
#elif defined(__GNUC__)
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE
/*!< \brief Value appropriate as a size for an array that will be allocated to a variable size. Built-in value usually works. */
#else
#define WOLFSSL_FLEXIBLE_ARRAY_SIZE 0
#endif

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants