Actions
Improvements #14040
closed
AB
RM
Build warning: unsafe use of tmpnam in SslUtils.C
Improvements #14040:
Build warning: unsafe use of tmpnam in SslUtils.C
Start date:
10/13/2025
Due date:
% Done:
0%
Estimated time:
Description
During the build process, the following warning was displayed:
/usr/bin/ld: CMakeFiles/test.wt.dir/utils/SslUtils.C.o: in function `SslUtils_readPrivateKey::test_method()':
SslUtils.C:(.text+0x71c): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
Impact:
The use of tmpnam is unsafe and can lead to race conditions when creating temporary files, posing a potential security risk.
Suggested action:
Replace tmpnam with mkstemp, which is the recommended and safer alternative according to the C/C++ documentation.
Steps to reproduce:
Run the full project build.
Observe the warning during the linking stage.
Environment:
$ uname -a
Linux instance-20250626-1716 6.14.0-1013-oracle #13~24.04.1-Ubuntu SMP Wed Sep 10 06:43:11 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
MV Updated by Matthias Van Ceulebroeck 11 months ago
- Target version set to 4.13.2
It's only in a test file, but yes, it ought to be avoided.
RM Updated by Romain Mardulyn 9 months ago
- Status changed from New to InProgress
- Assignee set to Romain Mardulyn
RM Updated by Romain Mardulyn 9 months ago
- Status changed from InProgress to Review
- Assignee deleted (
Romain Mardulyn)
RM Updated by Romain Mardulyn 5 months ago
- Target version changed from 4.13.2 to 4.13.3
MV Updated by Matthias Van Ceulebroeck 4 months ago
- Assignee set to Matthias Van Ceulebroeck
RM Updated by Romain Mardulyn 4 months ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Matthias Van Ceulebroeck to Romain Mardulyn
RM Updated by Romain Mardulyn 3 months ago
- Status changed from Implemented @Emweb to Closed
Actions