Skip to content

Commit

Permalink
Fix segfault when GetFeature on a invalid typename on a multi-layer map
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 4, 2013
1 parent 7c7fdcf commit fb393d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mapwfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,8 @@ int msWFSGetFeature(mapObj *map, wfsParamsObj *paramsObj, cgiRequestObj *req,
"TYPENAME '%s' doesn't exist in this server. Please check the capabilities and reformulate your request.",
"msWFSGetFeature()", layers[k]);
msFree(pszPropertyName);
msFreeCharArray(papszPropertyName, numlayers);
if( papszPropertyName )
msFreeCharArray(papszPropertyName, numlayers);
msFreeCharArray(layers, numlayers);
return msWFSException(map, "typename", "InvalidParameterValue", paramsObj->pszVersion);
}
Expand Down
2 changes: 1 addition & 1 deletion msautotest
Submodule msautotest updated from 22c882 to 040012

0 comments on commit fb393d6

Please sign in to comment.