Opened 19 years ago

Closed 16 years ago

#1198 closed defect (fixed)

msSetError overflows error message buffer

Reported by: jerry.pisk@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.4
Severity: major Keywords:
Cc: sgillies@…

Description (last modified by hobu)

msSetError can overflow the error message buffer if the resulting error 
message is longer than MESSAGELENGTH. There is no way that I know of to 
prevent this in ANSI C but ISO C99 provides vsnprintf, which is what I used in 
the submitted patch.

Attachments (1)

maperror.c.patch (505 bytes ) - added by jerry.pisk@… 19 years ago.
maperror.c patch

Download all attachments as: .zip

Change History (5)

by jerry.pisk@…, 19 years ago

Attachment: maperror.c.patch added

maperror.c patch

comment:1 by sgillies@…, 19 years ago

Cc: sgillies@… added

comment:2 by hobu, 17 years ago

Description: modified (diff)

Is this one long dead?

comment:3 by unicoletti, 16 years ago

I fixed this today in #2350 by using vsnprintf, am I wrong?

comment:4 by unicoletti, 16 years ago

Resolution: fixed
Status: newclosed

Grepping for snprintf reports many hits, so I assume that using vsnprintf is also ok. Closing.

Note: See TracTickets for help on using tickets.