Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libcaca for openSUSE:Factory checked in at 2021-04-18 21:45:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcaca (Old) and /work/SRC/openSUSE:Factory/.libcaca.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcaca" Sun Apr 18 21:45:13 2021 rev:46 rq:886087 version:0.99.beta19.git20171003 Changes: -------- --- /work/SRC/openSUSE:Factory/libcaca/libcaca.changes 2021-03-10 08:48:04.434320366 +0100 +++ /work/SRC/openSUSE:Factory/.libcaca.new.12324/libcaca.changes 2021-04-18 21:45:22.052747930 +0200 @@ -1,0 +2,10 @@ +Fri Apr 16 15:57:48 UTC 2021 - Josef M??llers <[email protected]> + +- The problem is due to the fact that the images in the POC have + a size of 0x0 and thus, when exporting, no data is written for + the image bits. + However, space is allocated for the header only, not taking + into account that sprintf appends a NUL byte. + [bsc#1184751, bsc#1184752, bsc1184751-add-space-for-NUL-byte.patch] + +------------------------------------------------------------------- New: ---- bsc1184751-add-space-for-NUL-byte.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcaca.spec ++++++ --- /var/tmp/diff_new_pack.VRKrmx/_old 2021-04-18 21:45:22.628748904 +0200 +++ /var/tmp/diff_new_pack.VRKrmx/_new 2021-04-18 21:45:22.644748931 +0200 @@ -38,6 +38,7 @@ Patch12: Bug1120502-add_cast_to_prevent_overflow.patch Patch13: Bug1143286_libcaca_configure_ac_chg_for_lto.patch Patch14: libcaca-bsc1182731-prevent-overflow.patch +Patch99: bsc1184751-add-space-for-NUL-byte.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: freeglut-devel @@ -144,6 +145,7 @@ %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch99 -p1 RUBY="ruby-`echo %{rb_ver} | sed 's|\.[^\.]*$||'`" find . -type f -exec sed -i "s|ruby-1.9|$RUBY|" \{\} \; pushd python ++++++ bsc1184751-add-space-for-NUL-byte.patch ++++++ Index: libcaca-da28e9684ef445ac8d42745644336b8a75c01855/caca/codec/export.c =================================================================== --- libcaca-da28e9684ef445ac8d42745644336b8a75c01855.orig/caca/codec/export.c +++ libcaca-da28e9684ef445ac8d42745644336b8a75c01855/caca/codec/export.c @@ -944,21 +944,21 @@ static void *export_tga(caca_canvas_t co cur = data = malloc(*bytes); /* ID Length */ - cur += sprintf(cur, "%c", 0); + *cur++ = 0; /* Color Map Type: no colormap */ - cur += sprintf(cur, "%c", 0); + *cur++ = 0; /* Image Type: uncompressed truecolor */ - cur += sprintf(cur, "%c", 2); + *cur++ = 2; /* Color Map Specification: no color map */ memset(cur, 0, 5); cur += 5; /* Image Specification */ - cur += sprintf(cur, "%c%c", 0, 0); /* X Origin */ - cur += sprintf(cur, "%c%c", 0, 0); /* Y Origin */ - cur += sprintf(cur, "%c%c", w & 0xff, w >> 8); /* Width */ - cur += sprintf(cur, "%c%c", h & 0xff, h >> 8); /* Height */ - cur += sprintf(cur, "%c", 32); /* Pixel Depth */ - cur += sprintf(cur, "%c", 40); /* Image Descriptor */ + *cur++ = 0; *cur++ = 0; /* X Origin */ + *cur++ = 0; *cur++ = 0; /* Y Origin */ + *cur++ = w & 0xff; *cur++ = w >> 8; /* Width */ + *cur++ = h & 0xff; *cur++ = h >> 8; /* Height */ + *cur++ = 32; /* Pixel Depth */ + *cur++ = 40; /* Image Descriptor */ /* Image ID: no ID */ /* Color Map Data: no colormap */ @@ -995,9 +995,13 @@ static void *export_troff(caca_canvas_t * + 4 bytes = 33 * Each line has a \n (1) and maybe 0xc2 0xa0 (2) * Header has .nf\n (3) + * Kludge alert: + * The sprintf functions all append a NUL byte, so + * add one byte for any terminating NUL byte, + * but don't tell the caller. */ *bytes = 3 + cv->height * 3 + (cv->width * cv->height * 33); - cur = data = malloc(*bytes); + cur = data = malloc(*bytes + 1); /* Add space for a terminating NUL byte */ cur += sprintf(cur, ".nf\n");
