[Boost-bugs] [Boost C++ Libraries] #5771: warning C4996 occurs during compilation of basic_binary_iprimitive::load_binary because of the call to sgetn method

Subject: [Boost-bugs] [Boost C++ Libraries] #5771: warning C4996 occurs during compilation of basic_binary_iprimitive::load_binary because of the call to sgetn method
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-10 21:20:54


#5771: warning C4996 occurs during compilation of
basic_binary_iprimitive::load_binary because of the call to sgetn method
-----------------------------------------------------+----------------------
 Reporter: Anton Matosov <anton.matosov@…> | Owner: ramey
     Type: Bugs | Status: new
Milestone: Boost 1.48.0 | Component: serialization
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: |
-----------------------------------------------------+----------------------
 warning C4996 occurs during compilation of
 basic_binary_iprimitive::load_binary because of the call to '''sgetn'''
 method:

 ''
 warning C4996: 'std::basic_streambuf<_Elem,_Traits>::sgetn': Function call
 with parameters that may be unsafe - this call relies on the caller to
 check that the passed values are correct. To disable this warning, use
 -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
 'Checked Iterators' e:\boost\include\boost-
 1_46_1\boost\archive\basic_binary_iprimitive.hpp 161
 ''

 Minimal code to reproduce:
 {{{
 #include <boost/archive/binary_iarchive.hpp>
 }}}

 easy solution for this is to use '''[http://msdn.microsoft.com/en-
 us/library/aa985925%28VS.80%29.aspx _Sgetn_s]''' for VC 8.0 and higher.

 Patch with a quick fix is attached to the ticket.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5771>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC