Skip to content

Commit

Permalink
mapkmlrenderer.cpp: fix warnings about sprintf() output being too small
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Mar 5, 2021
1 parent 169e9ac commit ae8e417
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapkmlrenderer.cpp
Expand Up @@ -1013,8 +1013,8 @@ const char* KmlRenderer::lookupPlacemarkStyle()
sprintf(lineHexColor,"%02x%02x%02x%02x", LineStyle[i].color->alpha, LineStyle[0].color->blue,
LineStyle[i].color->green, LineStyle[i].color->red);

char lineStyleName[32];
sprintf(lineStyleName, "_line_%s_w%.1f", lineHexColor, LineStyle[i].width);
char lineStyleName[64];
snprintf(lineStyleName, sizeof(lineStyleName), "_line_%s_w%.1f", lineHexColor, LineStyle[i].width);
styleName = msStringConcatenate(styleName, lineStyleName);
}
}
Expand Down

0 comments on commit ae8e417

Please sign in to comment.