Ticket #1366 (closed defect: fixed)
I fixed a bug in mapxbase.c that was causing sortshp to core dump
| Reported by: | mharnoldx@… | Owned by: | sdlime |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapServer C Library | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by hobu) (diff)
Thanks for mapserver! I am having lots of fun with it.
I found (and fixed) the following small bug in mapxbase.c
I've got:
mapserver version 4.4.1
MS_CVSID("$Id: mapxbase.c,v 1.18 2004/10/21 04:30:54 frank Exp $")
The following initializations were missing from msDBFCreate()
psDBF->pszStringField = NULL;
psDBF->nStringFieldLen = 0;
This caused sortshp to core dump in DBFClose() trying to free a garbage
pszStringField pointer.
I also changed the allocation from malloc() to calloc() as in MSDBFOpen()
fust to be safe.
I'll be glad to mail you my modified source file (just tell me where
to send it!)
Cheers,
Michael Arnold
P.S. I also added maplib.a to the sortshp dependencies in Makefile
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

