user debian-rele...@lists.debian.org usertags 1012888 + bsp-2022-10-de-karlsruhe control tags 1012888 + patch thank you
Hi, there are actually two problems that are fixed by the attached patch. 1. the src/V/Makefile did not include Makefile-include.txt like the other Makefiles, so it did not use the dpkg-buildflags. This caused a fallback to the upstream CFLAGS that include -Werror (and misses other flags set by dpkg-buildflags). Because VColor.o can get generated from two different directories, it's not deterministic (because of parallelism), with which flags the object is compiled. 2. src/V/VColor.c uses a potentially too small buffer for sprintf, which causes the warning (and because of 1 an error). Kind regards, Reiner
diff -Nru acm-6.0+20200416/debian/patches/fix_buffer_size.patch acm-6.0+20200416/debian/patches/fix_buffer_size.patch --- acm-6.0+20200416/debian/patches/fix_buffer_size.patch 1970-01-01 01:00:00.000000000 +0100 +++ acm-6.0+20200416/debian/patches/fix_buffer_size.patch 2022-10-15 15:40:22.000000000 +0200 @@ -0,0 +1,16 @@ +Author: Reiner Herrmann <rei...@reiner-h.de> +Bug-Debian: https://bugs.debian.org/1012888 +Description: Increase buffer size to have space for maximum possible output + VColor.c:91:9: note: ‘sprintf’ output between 8 and 11 bytes into a destination of size 8 + +--- a/src/V/VColor.c ++++ b/src/V/VColor.c +@@ -87,7 +87,7 @@ + + char * VColor_getName(VColor_Type *c) + { +- static char s[8]; ++ static char s[11]; + sprintf(s, "#%02u%02u%02u", c->red, c->green, c->blue); + return s; + } diff -Nru acm-6.0+20200416/debian/patches/hardening1.patch acm-6.0+20200416/debian/patches/hardening1.patch --- acm-6.0+20200416/debian/patches/hardening1.patch 2020-11-17 12:52:56.000000000 +0100 +++ acm-6.0+20200416/debian/patches/hardening1.patch 2022-10-15 15:40:22.000000000 +0200 @@ -85,3 +67,14 @@ return 0; } +--- a/src/V/Makefile ++++ b/src/V/Makefile +@@ -4,6 +4,8 @@ + CFLAGS := -Wall -Werror -g -fmax-errors=99 -Wuninitialized -Wmissing-prototypes -Wredundant-decls + LIBS := + ++include Makefile-include.txt ++ + .PHONY: all + all: + make Alib.o VColor.o VGlyph.o VObjects.o VPoly.o VRoman.o Vlib.o Vlibmath.o diff -Nru acm-6.0+20200416/debian/patches/series acm-6.0+20200416/debian/patches/series --- acm-6.0+20200416/debian/patches/series 2020-11-17 12:52:56.000000000 +0100 +++ acm-6.0+20200416/debian/patches/series 2022-10-15 15:40:22.000000000 +0200 @@ -3,3 +3,4 @@ set_default_object_dir.patch fix_paths_in_acm_tcl.patch hardening1.patch +fix_buffer_size.patch