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

Bug#748028: Conflicting parameter types yielding undefined behaviour



Package: cups-filters
Version: 1.0.53-1
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
libtool: link: gcc -DCONFIG_PATH=\"/etc/foomatic\" -I./cupsfilters/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -pedantic -std=gnu99 -D_GNU_SOURCE -Wl,-z -Wl,relro -Wl,--as-needed -o .libs/foomatic-rip foomatic_rip-foomaticrip.o foomatic_rip-options.o foomatic_rip-pdf.o foomatic_rip-postscript.o foomatic_rip-process.o foomatic_rip-renderer.o foomatic_rip-spooler.o foomatic_rip-util.o  -lm ./.libs/libcupsfilters.so /usr/lib/x86_64-linux-gnu/libtiff.so -ljpeg -ldl

file filter/foomatic-rip/pdf.c line 264: error: conflicting function declarations "print_pdf"
old definition in module foomaticrip file filter/foomatic-rip/pdf.h line 27
signed int (struct _IO_FILE *, const char *, unsigned long int, const char *, signed int)
new definition in module pdf file filter/foomatic-rip/pdf.c line 264
signed int (struct _IO_FILE *s, const char *alreadyread, unsigned long int len, const char *filename, unsigned long int startpos)
make[2]: *** [foomatic-rip] Error 64
make[2]: Leaving directory `/srv/jenkins-slave/workspace/sid-goto-cc-cups-filters/cups-filters-1.0.53'

Observe the difference (int vs. unsigned long) on the parameter startpos. For
any platform with sizeof(unsigned long) > sizeof(int), such as amd64, the high
bytes of startpos will take an arbitrary value.

If the semantics of startpos is what its name suggests, it may be worth raising
the severity of this bug report (if not tagging it security).

Best,
Michael

Attachment: pgpIbXlliJWYJ.pgp
Description: PGP signature


Reply to: