Opened 21 years ago
Closed 21 years ago
#344 closed defect (fixed)
mapserver crash when opening a non existing shape file
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-PHP | Version: | 4.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
ex : <?php dl("php_mapscript_40.dll"); $oShapFile = ms_newShapeFileObj("c:/msapps/gmap/data/roads", -1); ?> if roads does not exsit there is a crash happning in the msSHPCloseFile function. I have tested this on Windows. Not sure if it happens on other platforms.
Change History (5)
comment:1 by , 21 years ago
Summary: | mapserver crash when opening a non existing shape file → mapserver crash when opening a non existing shape file |
---|
comment:2 by , 21 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
*** This bug has been marked as a duplicate of 343 ***
comment:3 by , 21 years ago
Cc: | added |
---|---|
Resolution: | duplicate |
Status: | closed → reopened |
Reopened. It doesn't seem that this was a duplicate of 343 after all.
comment:4 by , 21 years ago
This works in perl on Linux. The shapefile doesn't exist and the script fails as you'd expect. #!/usr/bin/perl use mapscript; $shapefile = new mapscript::shapefileObj("/usr/local/data/roads", -1) or die "Unable to open shapefile."; Steve
comment:5 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Corrected in mapscript_i.c (r1.65). Used calloc instead of malloc when creating a new shapefile object.
Note:
See TracTickets
for help on using tickets.