Re: [Gimp-print-devel] 5.3.1 FTBFS on Debian
On Tue, 25 Sep 2018 09:30:58 +0200, Didier 'OdyX' Raboud wrote:
> Hi there,
>
> while packaging the 5.3.1 version for Debian, I didn't manage to make it
> build:
>
> gutenprint.c: In function =E2=80=98cat_ppd':
> gutenprint.c:179:64: warning: =E2=80=98%s' directive output may be truncated writing
> up to 1023 bytes into a region of size between 1016 and 1018 [-Wformat-
> truncation=]
> snprintf(ppd_location, sizeof(ppd_location) - 1, "%s%s%s/ppd/%s%s",
> ^~
> gutenprint.c:183:5:
> filename, gpext);
> ~~~~~~~~
> In file included from /usr/include/stdio.h:862,
> from ../../include/gutenprint/gutenprint.h:45,
> from i18n.h:20,
> from genppd.h:36,
> from gutenprint.c:40:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
> =E2=80=98__builtin___snprintf_chk' output 6 or more bytes (assuming 1031) into a
> destination of size 1023
> return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> __bos (__s), __fmt, __va_arg_pack ());
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
>
>
> A full build log is attached; you can see the build logs for 5.3.0~pre1 there
> (https://buildd.debian.org/status/package.php?
> p=gutenprint&suite=experimental); I'd welcome a
> hint there (please CC me on replies, I'm not on the list).
Thanks. I don't have gcc8 so I didn't get this. Does this fix work?
diff --git a/src/cups/gutenprint.c b/src/cups/gutenprint.c
index 6ab2194e..56b55994 100644
--- a/src/cups/gutenprint.c
+++ b/src/cups/gutenprint.c
@@ -122,7 +122,7 @@ cat_ppd(const char *uri) /* I - Driver URI */
const char *lang = NULL;
char *s;
char filename[1024], /* Filename */
- ppd_location[1024]; /* Installed location */
+ ppd_location[2048]; /* Installed location */
const char *infix = "";
ppd_type_t ppd_type = PPD_STANDARD;
gpfile outFD;
--
Robert Krawitz <rlk@alum.mit.edu>
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Reply to: