Opened 6 years ago

Closed 6 years ago

#12460 closed Bugs (wontfix)

Switch from std::getenv to _dupenv_s

Reported by: anonymous Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.61.0 Severity: Optimization
Keywords: Serialization Cc:

Description

5>C:\Boost\boost_1_61_0\boost/archive/tmpdir.hpp(35): error C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. (AccessCommon.cpp) 5> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdlib.h(449) : see declaration of 'getenv'

It would be good to update the code to use _dupenv_s. I'rather not use _CRT_SECURE_NO_WARNINGS since that covers over sins in other code.

Change History (1)

comment:1 by Robert Ramey, 6 years ago

Resolution: wontfix
Status: newclosed

this is not part of the standard library. So making this change would break serialization tests for all the other compilers.

Note that this is only used for the serialization library tests - so it shouldn't create a security issue in user code.

Note: See TracTickets for help on using tickets.