Skip to content
Permalink
Browse files
Fix memory corruption when GEOMTRANSFORM and SHADOWCOLOR is used in l…
…abel simultaneously #6114
  • Loading branch information
github-actions[bot] committed Jul 10, 2020
1 parent 676691a commit 3d2af949110dc8789196a8d9a8721ec27228d13f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
@@ -143,6 +143,16 @@ void msCopyTextSymbol(textSymbolObj *dst, textSymbolObj *src) {
dst->textpath = msSmallMalloc(sizeof(textPathObj));
msCopyTextPath(dst->textpath,src->textpath);
}
if(dst->style_bounds) {
int i;
dst->style_bounds = msSmallCalloc(src->label->numstyles, sizeof(label_bounds*));
for(i=0; i<src->label->numstyles; i++) {
if(src->style_bounds[i]) {
dst->style_bounds[i] = msSmallMalloc(sizeof(label_bounds));
copyLabelBounds(dst->style_bounds[i], src->style_bounds[i]);
}
}
}
}

static int labelNeedsDeepCopy(labelObj *label) {
@@ -1843,6 +1843,7 @@ void msCopyTextPath(textPathObj *dst, textPathObj *src);
void freeTextPath(textPathObj *tp);
void initTextSymbol(textSymbolObj *ts);
void freeTextSymbol(textSymbolObj *ts);
void copyLabelBounds(label_bounds *dst, label_bounds *src);
void msCopyTextSymbol(textSymbolObj *dst, textSymbolObj *src);
void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char *string, double scalefactor, double resolutionfactor, label_cache_mode cache);
#endif /* SWIG */

0 comments on commit 3d2af94

Please sign in to comment.