Ticket #2213 (closed defect: fixed)
msIO_printf() silently does nothing when output is larger than workbuf
| Reported by: | dmorissette | Owned by: | dmorissette |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0 release |
| Component: | MapServer C Library | Version: | svn-trunk (development) |
| Severity: | normal | Keywords: | |
| Cc: | warmerdam, sdlime |
Description
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[8000] (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.
Change History
Note: See
TracTickets for help on using
tickets.
