Opened 14 years ago

Closed 14 years ago

#556 closed defect (fixed)

Return value of snprintf not correctly checked

Reported by: hopfgartner Owned by: pramsey
Priority: low Milestone:
Component: postgis Version: master
Keywords: Cc:

Description

In loader/shp2pgsql-core.c the return value of snprintf is compared to -1. Anyway, in case of errors the return value might >= the buffer size if the output string was truncated or -1 for other errors see man snprintf.

Attachments (1)

shp2pgsql-core.c.diff (1.5 KB ) - added by hopfgartner 14 years ago.

Download all attachments as: .zip

Change History (3)

by hopfgartner, 14 years ago

Attachment: shp2pgsql-core.c.diff added

comment:1 by pramsey, 14 years ago

Committed to trunk at r6360, thanks for the patch!

comment:2 by pramsey, 14 years ago

Resolution: fixed
Status: newclosed

Committed to 1.5 at r6361.

Note: See TracTickets for help on using tickets.