summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/s6-linux-init/APKBUILD2
-rw-r--r--system/skalibs/APKBUILD8
-rw-r--r--system/skalibs/env_dump-unterminated-strings.patch26
3 files changed, 32 insertions, 4 deletions
diff --git a/system/s6-linux-init/APKBUILD b/system/s6-linux-init/APKBUILD
index 9217a7d03..a52c329d5 100644
--- a/system/s6-linux-init/APKBUILD
+++ b/system/s6-linux-init/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6-linux-init
pkgver=1.0.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="A s6-based init system"
url="https://skarnet.org/software/$pkgname/"
arch="all"
diff --git a/system/skalibs/APKBUILD b/system/skalibs/APKBUILD
index a55906f6d..cbf64462e 100644
--- a/system/skalibs/APKBUILD
+++ b/system/skalibs/APKBUILD
@@ -2,14 +2,15 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=skalibs
pkgver=2.8.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="A set of general-purpose C programming libraries for skarnet.org software"
url="https://skarnet.org/software/skalibs/"
arch="all"
options="!check" # No test suite.
license="ISC"
subpackages="$pkgname-libs $pkgname-dev $pkgname-libs-dev:libsdev $pkgname-doc"
-source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
+source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz
+ env_dump-unterminated-strings.patch"
build() {
cd "$builddir"
@@ -59,4 +60,5 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="d2717e6f034af22a7b2ce31b019f30cfa270f64c61549db7b60b319defc5236fc6b58d29a4dae0f740ffdf32180b1940630f4239ea40cbedfcc5861398d20d86 skalibs-2.8.1.0.tar.gz"
+sha512sums="d2717e6f034af22a7b2ce31b019f30cfa270f64c61549db7b60b319defc5236fc6b58d29a4dae0f740ffdf32180b1940630f4239ea40cbedfcc5861398d20d86 skalibs-2.8.1.0.tar.gz
+286a8e0537399fc52c550c1aeac7dd0748c07d34d51b65cb36ab9e3db5a44ff51ba988c212c6bafa74b107ce80698bcab37a99df6276fe7ce60550de0ffc0567 env_dump-unterminated-strings.patch"
diff --git a/system/skalibs/env_dump-unterminated-strings.patch b/system/skalibs/env_dump-unterminated-strings.patch
new file mode 100644
index 000000000..a20a78125
--- /dev/null
+++ b/system/skalibs/env_dump-unterminated-strings.patch
@@ -0,0 +1,26 @@
+From d69644de85148f56efeed4259a783881e2a1bddc Mon Sep 17 00:00:00 2001
+From: Laurent Bercot <ska-skaware@skarnet.org>
+Date: Wed, 31 Jul 2019 23:47:35 +0000
+Subject: [PATCH] bugfix: env_dump() unterminated strings
+
+---
+ src/libstddjb/env_dump.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/libstddjb/env_dump.c b/src/libstddjb/env_dump.c
+index fc79bc3..10f5913 100644
+--- a/src/libstddjb/env_dump.c
++++ b/src/libstddjb/env_dump.c
+@@ -32,7 +32,8 @@ int env_dump (char const *dir, mode_t mode, char const *const *envp)
+ size_t len = str_chr(*envp, '=') ;
+ size_t vallen = strlen(*envp + len + 1) ;
+ char fn[len + 1] ;
+- memcpy(fn, *envp, len + 1) ;
++ memcpy(fn, *envp, len) ;
++ fn[len] = 0 ;
+ len = openwritenclose_at(fd, fn, *envp + len + 1, vallen) ;
+ if (len < vallen) goto cerr ;
+ }
+--
+2.22.0
+