[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warning in svg_load_image
From: |
Po Lu |
Subject: |
Re: Warning in svg_load_image |
Date: |
Tue, 22 Feb 2022 11:53:07 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> What about the one below:
That also gives another warning:
image.c: In function 'svg_load_image':
image.c:10776:7: warning: '%5.0f' directive output may be truncated writing
between 5 and 310 bytes into a region of size between 173 and 193
[-Wformat-truncation=]
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" "
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:10780:22: note: format string is defined here
"viewBox=\"0 0 %5.0f %5.0f\">"
^~~~~
image.c:10776:7: note: directive argument in the range [0, 16777215]
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" "
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:10776:7: note: assuming directive output of 1 byte
image.c:10802:24: note: 'snprintf' output 324 or more bytes (assuming 325) into
a destination of size 389
if (buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foreground & 0xFFFFFF, width, height,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* Sanitize the viewBox dimensions. */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
min (viewbox_width, 10000.),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
min (viewbox_height, 10000.),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
background & 0xFFFFFF,
~~~~~~~~~~~~~~~~~~~~~~
SSDATA (encoded_contents)))
(I don't know my way around SVG, so I can't fix it myself, sorry.)
- Warning in svg_load_image, Po Lu, 2022/02/21
- Re: Warning in svg_load_image, Eli Zaretskii, 2022/02/21
- Re: Warning in svg_load_image, Michael Welsh Duggan, 2022/02/23
- Re: Warning in svg_load_image, Eli Zaretskii, 2022/02/23
- Re: Warning in svg_load_image, Michael Welsh Duggan, 2022/02/23
- Re: Warning in svg_load_image, Eli Zaretskii, 2022/02/24
- Re: Warning in svg_load_image, Andreas Schwab, 2022/02/23
- Re: Warning in svg_load_image, Eli Zaretskii, 2022/02/24
- Message not available
- Re: Warning in svg_load_image, Po Lu, 2022/02/23