Skip to content

Commit

Permalink
ogr: replace CPLExpandTilde() with CPLExpandTildeSafe()
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 14, 2025
1 parent f9e3c25 commit 06be59b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ogr/ogrsf_frmts/gmlas/ogrgmlasdatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,10 @@ bool OGRGMLASDataSource::Open(GDALOpenInfo *poOpenInfo)
m_oConf.m_nMaximumFieldsForFlattening);
oAnalyzer.SetAlwaysGenerateOGRId(m_oConf.m_bAlwaysGenerateOGRId);

m_osGMLFilename =
STARTS_WITH_CI(poOpenInfo->pszFilename, szGMLAS_PREFIX)
? CPLExpandTilde(poOpenInfo->pszFilename + strlen(szGMLAS_PREFIX))
: poOpenInfo->pszFilename;
m_osGMLFilename = STARTS_WITH_CI(poOpenInfo->pszFilename, szGMLAS_PREFIX)
? CPLExpandTildeSafe(poOpenInfo->pszFilename +
strlen(szGMLAS_PREFIX))
: poOpenInfo->pszFilename;

CPLString osXSDFilenames =
CSLFetchNameValueDef(poOpenInfo->papszOpenOptions, szXSD_OPTION, "");
Expand Down

0 comments on commit 06be59b

Please sign in to comment.