Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#6718 closed defect (fixed)

GDAL DODS driver crashes on URL that are not DODS servers

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 2.1.3
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Change History (4)

comment:1 Changed 8 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 36174:

DODS: fix crash on URL that are not DODS servers (fixes #6718)

comment:2 Changed 8 months ago by Even Rouault

In 36175:

DODS: fix crash on URL that are not DODS servers (fixes #6718)

comment:3 Changed 8 months ago by Even Rouault

Milestone: 2.1.3

comment:4 Changed 8 months ago by Kurt Schwehr

Some extra context since I already have it.

This was easily reproducible without python using gdalinfo.

A sample stack trace of the segfault on ubuntu 14.04:

gdb gdalinfo
set args "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/0/query?where=objectid3D+objectid&outfields=*&f=json"
run
bt

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1534480 in libdap::BaseType::type() const () from /usr/lib/x86_64-linux-gnu/libdap.so.11
(gdb) bt
#0  0x00007ffff1534480 in libdap::BaseType::type() const () from /usr/lib/x86_64-linux-gnu/libdap.so.11
#1  0x00007ffff6ae8f3c in DODSDataset::CollectBandsFromDDSVar (this=0x657cb0, oVarName="where=objectid3D+objectid&outfields=*&f=json", papszResultList=0x0)
    at dodsdataset2.cpp:498
#2  0x00007ffff6ae96a6 in DODSDataset::ParseBandsFromURL (this=0x657cb0, oVarList="where=objectid3D+objectid&outfields=*&f=json") at dodsdataset2.cpp:631
#3  0x00007ffff6aeb9d6 in DODSDataset::Open (poOpenInfo=0x7fffffffd5a0) at dodsdataset2.cpp:1021
#4  0x00007ffff6fe11c4 in GDALOpenEx (
    pszFilename=0x656800 "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/0/query?where=objectid3D+objectid&outfields=*&f=json", nOpenFlags=66, papszAllowedDrivers=0x0, papszOpenOptions=0x0, papszSiblingFiles=0x0) at gdaldataset.cpp:2784
#5  0x000000000040146f in main (argc=2, argv=0x656640) at gdalinfo_bin.cpp:131

The segfault gone.

ERROR 4: `/tmp/file.dat' not recognised as a supported file format.

gdalinfo failed - unable to open 'http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/0/query?where=objectid3D+objectid&outfields=*&f=json'.
Note: See TracTickets for help on using tickets.