emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Warning in svg_load_image


From: Po Lu
Subject: Warning in svg_load_image
Date: Mon, 21 Feb 2022 15:53:51 +0800

I get this building on i586-pc-solaris2.11 with rsvg support:

image.c: In function 'svg_load_image':
image.c:10776:7: warning: '%f' directive output may be truncated writing 
between 8 and 317 bytes into a region of size between 167 and 187 
[-Wformat-truncation=]
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\"; "
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:10780:22: note: format string is defined here
       "viewBox=\"0 0 %f %f\">"
                      ^~
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 330 or more bytes (assuming 331) into 
a destination of size 383
     if (buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      foreground & 0xFFFFFF, width, height,
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      viewbox_width, viewbox_height,
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      background & 0xFFFFFF,
      ~~~~~~~~~~~~~~~~~~~~~~
      SSDATA (encoded_contents)))
      ~~~~~~~~~~~~~~~~~~~~~~~~~~

Does anyone want to fix this?

Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]