Permalink
Browse files

mapogcsld: fix potential overflow when writing hexcolor in the unlike…

…ly case color components are bigger than 255
  • Loading branch information...
gogglesguy committed Aug 20, 2018
1 parent 636394c commit c86b5e5bfbe386621e08f21e8f85e3f16fc0a340
Showing with 1 addition and 1 deletion.
  1. +1 −1 mapogcsld.c
@@ -4013,7 +4013,7 @@ char *msSLDGenerateTextSLD(classObj *psClass, layerObj *psLayer, int nVersion)
snprintf(szTmp, sizeof(szTmp), "<%sFill>\n", sNameSpace );
pszSLD = msStringConcatenate(pszSLD, szTmp);
sprintf(szHexColor,"%02x%02x%02x",nColorRed,
sprintf(szHexColor,"%02hhx%02hhx%02hhx",nColorRed,
nColorGreen, nColorBlue);
snprintf(szTmp, sizeof(szTmp),

0 comments on commit c86b5e5

Please sign in to comment.