[reSIProcate] Issue compiling Security.cxx
Daniel Pocock
daniel at pocock.com.au
Tue Sep 10 06:25:05 CDT 2013
On 09/09/13 20:03, Adam Roach wrote:
> On 9/9/13 11:23, Dario Bozzali wrote:
>>
>> I got the latest trunk revision of Resiprocate repository (10430),
>> but I'm facing an issue while compiling Security.cxx using Visual
>> Studio 2005.
>>
>> In particular the error that I obtain is the following one:
>>
>> 1>.\ssl\Security.cxx(177) : error C3861: 'snprintf': identifier not found
>>
>> I think that it could be necessary to use _snprintf instead of
>> snprintf function, for example using a define like in the excerpt of
>> code that I reported below.
>>
>
> The problem here is that snprintf() guarantees null termination, while
> Windows' _snprintf() does not (which can lead to some really nasty
> security bugs). Because of this flaw, the general guidance that I
> offer is that no one should ever use use Windows' _snprintf() -- it's
> fundamentally broken.
>
> I think what you really need to do is define a new function that wraps
> _snprintf_s, with a "count" argument set to "_TRUNCATE".
I just added one potential solution into rutil/compat.hxx
Can you try updating to r10434 and test it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20130910/6fb4d15b/attachment.htm>
More information about the resiprocate-devel
mailing list