Date: Sunday, May 23, 2021 @ 19:13:04
  Author: heftig
Revision: 943518

archrelease: copy trunk to multilib-x86_64

Added:
  lib32-libcaca/repos/multilib-x86_64/57.patch
    (from rev 943517, lib32-libcaca/trunk/57.patch)
  lib32-libcaca/repos/multilib-x86_64/PKGBUILD
    (from rev 943517, lib32-libcaca/trunk/PKGBUILD)
Deleted:
  lib32-libcaca/repos/multilib-x86_64/PKGBUILD

----------+
 57.patch |   59 ++++++++++++++++++++++++
 PKGBUILD |  146 +++++++++++++++++++++++++++++++------------------------------
 2 files changed, 135 insertions(+), 70 deletions(-)

Copied: lib32-libcaca/repos/multilib-x86_64/57.patch (from rev 943517, 
lib32-libcaca/trunk/57.patch)
===================================================================
--- 57.patch                            (rev 0)
+++ 57.patch    2021-05-23 19:13:04 UTC (rev 943518)
@@ -0,0 +1,59 @@
+From 148437fc418bcfe521f61213cf3917f3992c7088 Mon Sep 17 00:00:00 2001
+From: Josef Moellers <jmoell...@suse.de>
+Date: Thu, 22 Apr 2021 12:02:19 +0200
+Subject: [PATCH] Handle sprintf() appending a NUL byte [issues 53 and 54]
+
+---
+ caca/codec/export.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/caca/codec/export.c b/caca/codec/export.c
+index 7f7c4422..250ea2b1 100644
+--- a/caca/codec/export.c
++++ b/caca/codec/export.c
+@@ -944,21 +944,21 @@ static void *export_tga(caca_canvas_t const *cv, size_t 
*bytes)
+     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 const *cv, size_t 
*bytes)
+      *  + 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");
+ 

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2021-05-23 19:12:37 UTC (rev 943517)
+++ PKGBUILD    2021-05-23 19:13:04 UTC (rev 943518)
@@ -1,70 +0,0 @@
-# Maintainer: Felix Yan <felixonm...@archlinux.org>
-# Contributor: Limao Luo <luolimao+...@gmail.com>
-# Contributor: GordonGR <gordo...@freemail.gr>
-
-pkgname=lib32-libcaca
-pkgver=0.99.beta19
-pkgrel=4
-pkgdesc="Color AsCii Art library (32-bit)"
-url="http://caca.zoy.org/wiki/libcaca";
-arch=(x86_64)
-license=(custom:WTFPL)
-depends=(lib32-imlib2 libcaca)
-makedepends=(git)
-_commit=caae67dce5d72ceceac79468bed47b58ea8e4a29  # tags/v0.99.beta19
-source=("git+https://github.com/cacalabs/libcaca#commit=$_commit";)
-sha256sums=('SKIP')
-
-pkgver() {
-  cd libcaca
-  git describe --tags | sed 's/^v//;s/-/+/g'
-}
-
-prepare() {
-  cd libcaca
-
-  # CVE-2021-3410
-  # https://bugs.archlinux.org/task/70053
-  git cherry-pick -n 46b4ea7c e4968ba6
-
-  # Fix up version
-  sed -i '/^AC_INIT/s/beta19pre/beta19/;/^LT_MICRO=/s/18/19/' configure.ac
-
-  autoreconf -fvi
-}
-
-build() {
-  export CC="gcc -m32"
-  export CXX="g++ -m32"
-  export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
-
-  cd libcaca
-  ./configure \
-    --build=x86_64-pc-linux-gnu \
-    --prefix=/usr \
-    --libdir=/usr/lib32 \
-    --libexecdir=/usr/lib \
-    --mandir=/usr/share/man \
-    --enable-shared \
-    --disable-csharp \
-    --disable-cxx \
-    --disable-doc \
-    --disable-gl \
-    --disable-python \
-    --disable-slang \
-    --disable-static
-  make
-}
-
-package() {
-  cd libcaca
-  make DESTDIR="$pkgdir" install
-
-  rm -r "$pkgdir"/usr/{share,include}
-  find "$pkgdir/usr/bin" -type f -not -name caca-config -printf 'Removing 
%P\n' -delete
-  mv "$pkgdir"/usr/bin/caca-config{,-32}
-
-  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
-}
-
-# vim:set sw=2 noet:

Copied: lib32-libcaca/repos/multilib-x86_64/PKGBUILD (from rev 943517, 
lib32-libcaca/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2021-05-23 19:13:04 UTC (rev 943518)
@@ -0,0 +1,76 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Limao Luo <luolimao+...@gmail.com>
+# Contributor: GordonGR <gordo...@freemail.gr>
+
+pkgname=lib32-libcaca
+pkgver=0.99.beta19
+pkgrel=5
+pkgdesc="Color AsCii Art library (32-bit)"
+url="http://caca.zoy.org/wiki/libcaca";
+arch=(x86_64)
+license=(custom:WTFPL)
+depends=(lib32-imlib2 libcaca)
+makedepends=(git)
+_commit=caae67dce5d72ceceac79468bed47b58ea8e4a29  # tags/v0.99.beta19
+source=("git+https://github.com/cacalabs/libcaca#commit=$_commit";
+        57.patch)
+sha256sums=('SKIP'
+            'ece7dc2cf7e0252a88ff943ec0851c19aeeab5d20b26396984810524347ea38a')
+
+pkgver() {
+  cd libcaca
+  git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+  cd libcaca
+
+  # CVE-2021-3410
+  # https://bugs.archlinux.org/task/70053
+  git cherry-pick -n 46b4ea7c e4968ba6
+
+  # CVE-2021-30498 CVE-2021-30499
+  # https://bugs.archlinux.org/task/70520
+  git apply -3 ../57.patch
+
+  # Fix up version
+  sed -i '/^AC_INIT/s/beta19pre/beta19/;/^LT_MICRO=/s/18/19/' configure.ac
+
+  autoreconf -fvi
+}
+
+build() {
+  export CC="gcc -m32"
+  export CXX="g++ -m32"
+  export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
+
+  cd libcaca
+  ./configure \
+    --build=x86_64-pc-linux-gnu \
+    --prefix=/usr \
+    --libdir=/usr/lib32 \
+    --libexecdir=/usr/lib \
+    --mandir=/usr/share/man \
+    --enable-shared \
+    --disable-csharp \
+    --disable-cxx \
+    --disable-doc \
+    --disable-gl \
+    --disable-python \
+    --disable-slang \
+    --disable-static
+  make
+}
+
+package() {
+  cd libcaca
+  make DESTDIR="$pkgdir" install
+
+  rm -r "$pkgdir"/usr/{share,include}
+  find "$pkgdir/usr/bin" -type f -not -name caca-config -printf 'Removing 
%P\n' -delete
+  mv "$pkgdir"/usr/bin/caca-config{,-32}
+
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
+}
+
+# vim:set sw=2 et:

Reply via email to