Changes between Initial Version and Version 2 of Ticket #106


Ignore:
Timestamp:
02/16/07 17:59:29 (12 years ago)
Author:
bennylp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #106

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
    • Property Summary changed from Write overflow in PJLIB's win32 error string to Write outside buffer in PJLIB's win32 error string
  • Ticket #106 – Description

    initial v2  
    11The PJLIB's Win32 version of {{{platform_strerror()}}} may write data outside the buffer (on buffer[-1] location to be precise) when the function is unable to retrieve the error string using {{{FormatMessage}}} function. 
     2 
     3This is caused by the function naively assumes that snprintf will never return negative value: 
     4{{{ 
     5 len = pj_ansi_snprintf(buffer, bufsize, ...); 
     6 buffer[len] = '\0'; 
     7}}}