Ticket #2213 (closed defect: fixed)
msIO_printf() silently does nothing when output is larger than workbuf
|Reported by:||dmorissette||Owned by:||dmorissette|
|Component:||MapServer C Library||Version:||svn-trunk (development)|
While looking into ticket #1946, I found that msIO_printf() does not print anything and just silently returns -1 when the output is larger than the allocated workBuf (i.e. if vsnprintf returns a value larger than 8000).
Since calling code rarely checks the return value of printf calls, the user is never notified of the error. What would you think of adding a msSetError() call in this case? Even if the error is not trapped, it would show up in MS_ERRORFILE if it is enabled.