Changeset 19563


Ignore:
Timestamp:
Apr 28, 2010 2:02:05 PM (6 years ago)
Author:
rouault
Message:

Rasterlite: fix subtle heap use problems due to reusing in CPLSetConfigOption() an old value got by CPLGetConfigOption() (#3553)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gdal/frmts/rasterlite/rasterliteoverviews.cpp

    r18610 r19563  
    547547            OGRReleaseDataSource(hDS);
    548548           
    549             const char* pszOldVal = CPLGetConfigOption("SQLITE_LIST_ALL_TABLES", "FALSE");
     549            CPLString osOldVal = CPLGetConfigOption("SQLITE_LIST_ALL_TABLES", "FALSE");
    550550            CPLSetConfigOption("SQLITE_LIST_ALL_TABLES", "TRUE");
    551551            hDS = OGROpen(osFileName.c_str(), TRUE, NULL);
    552             CPLSetConfigOption("SQLITE_LIST_ALL_TABLES", pszOldVal);
     552            CPLSetConfigOption("SQLITE_LIST_ALL_TABLES", osOldVal.c_str());
    553553           
    554554            osSQL.Printf("SELECT COUNT(*) FROM \"%s\" WHERE "
Note: See TracChangeset for help on using the changeset viewer.