Skip to content

Fix for using sprintf in test.h#7792

Merged
SparkiDev merged 2 commits intowolfSSL:masterfrom
dgarske:sprintf
Jul 29, 2024
Merged

Fix for using sprintf in test.h#7792
SparkiDev merged 2 commits intowolfSSL:masterfrom
dgarske:sprintf

Conversation

@dgarske
Copy link
Copy Markdown
Member

@dgarske dgarske commented Jul 25, 2024

Description

Fix for using sprintf in test.h

Resolves warning:

./configure CC="gcc -fsanitize=address" && make
In file included from ./wolfclu/clu_header_main.h:71:
/usr/local/include/wolfssl/test.h:1103:18: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
        strLen = sprintf(serialMsg, " %s", words[3]);
                 ^

Testing

wolfSSL: ./configure --enable-wolfclu --enable-crl --enable-dsa && make && sudo make install
wolfCLU: ./configure CC="gcc -fsanitize=address" && make

Checklist

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

@dgarske dgarske self-assigned this Jul 25, 2024
@dgarske
Copy link
Copy Markdown
Member Author

dgarske commented Jul 26, 2024

Retest this please

@dgarske
Copy link
Copy Markdown
Member Author

dgarske commented Jul 26, 2024

Retest this please

@dgarske dgarske assigned dgarske and unassigned dgarske Jul 26, 2024
SparkiDev
SparkiDev previously approved these changes Jul 28, 2024
@dgarske
Copy link
Copy Markdown
Member Author

dgarske commented Jul 29, 2024

Retest this please

Resolves warning:

```
./configure CC="gcc -fsanitize=address" && make
In file included from ./wolfclu/clu_header_main.h:71:
/usr/local/include/wolfssl/test.h:1103:18: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
        strLen = sprintf(serialMsg, " %s", words[3]);
                 ^
```
@SparkiDev SparkiDev merged commit 7da6149 into wolfSSL:master Jul 29, 2024
@dgarske dgarske deleted the sprintf branch August 13, 2024 19:25
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.

3 participants