Skip to content
Permalink
Browse files Browse the repository at this point in the history
security fix (patch by EvenR)
  • Loading branch information
jmckenna committed Jan 16, 2017
1 parent 1c059c3 commit e52a436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mapogcfilter.c
Expand Up @@ -3004,6 +3004,8 @@ char *FLTGetIsLikeComparisonExpression(FilterEncodingNode *psFilterNode)

pszValue = psFilterNode->psRightNode->pszValue;
nLength = strlen(pszValue);
if( 1 + 2 * nLength + 1 + 1 >= sizeof(szTmp) )
return NULL;

iTmp =0;
if (nLength > 0 && pszValue[0] != pszWild[0] &&
Expand Down
2 changes: 2 additions & 0 deletions mapogcfiltercommon.c
Expand Up @@ -88,6 +88,8 @@ char *FLTGetIsLikeComparisonCommonExpression(FilterEncodingNode *psFilterNode)

pszValue = psFilterNode->psRightNode->pszValue;
nLength = strlen(pszValue);
if( 1 + 2 * nLength + 1 + 1 >= sizeof(szTmp) )
return NULL;

iTmp =0;
if (nLength > 0 && pszValue[0] != pszWild[0] && pszValue[0] != pszSingle[0] && pszValue[0] != pszEscape[0]) {
Expand Down

0 comments on commit e52a436

Please sign in to comment.