forked from enlightenment/efl
evas textblock - use snprintf to limit buffer and have buffer big enough
the buffer wasn't big enough for all possible content anyway and it didn't use snprintf, so large values of i could overflow... pointed to by warning. fix that warning.
This commit is contained in:
parent
ed7fb7ae27
commit
e2887ec2aa
|
@ -15631,9 +15631,9 @@ void fit_style_update(Evas_Object *object, int i_font_size, Eina_Bool disable_el
|
||||||
char * fit_style = fc->fit_style;
|
char * fit_style = fc->fit_style;
|
||||||
if (i_font_size >= 0)
|
if (i_font_size >= 0)
|
||||||
{
|
{
|
||||||
char font_size[0xF] = {0};
|
char font_size[24];
|
||||||
char *pfont = font_size;
|
char *pfont = font_size;
|
||||||
sprintf(font_size, "font_size=%i ", i_font_size);
|
snprintf(font_size, sizeof(font_size), "font_size=%i ", i_font_size);
|
||||||
while (*pfont)
|
while (*pfont)
|
||||||
{
|
{
|
||||||
*fit_style = *pfont;
|
*fit_style = *pfont;
|
||||||
|
|
Loading…
Reference in New Issue