summaryrefslogtreecommitdiffstats
path: root/deps/util-linux/bsdstrings-util-linux_overflow.diff
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-06-17 14:10:24 +0200
committer Eric Hameleers <alien@slackware.com>2020-06-17 14:10:24 +0200
commitdf34379cc4505e01b2d7e7c6611df808da46bf15 (patch)
tree9f6c36c737802fee375bcac39645e460fca9a3fe /deps/util-linux/bsdstrings-util-linux_overflow.diff
parent119353649d8ac4a65e6e5f4d859a017802fd87bd (diff)
downloadktown-df34379cc4505e01b2d7e7c6611df808da46bf15.tar.gz
ktown-df34379cc4505e01b2d7e7c6611df808da46bf15.tar.xz
deps/util-linux: get rid of compressed patches in the git repo
Diffstat (limited to 'deps/util-linux/bsdstrings-util-linux_overflow.diff')
-rw-r--r--deps/util-linux/bsdstrings-util-linux_overflow.diff20
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/util-linux/bsdstrings-util-linux_overflow.diff b/deps/util-linux/bsdstrings-util-linux_overflow.diff
new file mode 100644
index 0000000..127ff9d
--- /dev/null
+++ b/deps/util-linux/bsdstrings-util-linux_overflow.diff
@@ -0,0 +1,20 @@
+From db281fc97f1d665a61acabfd8d5933130996b29f Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@zoho.com>
+Date: Wed, 29 Oct 2014
+Subject: Heap overflow
+
+Fix heap-buffer-overflow in strings.c as bundled by util-linux
+through version 2.9 and as shipped by Slackware Linux and
+Slackware derivatives.
+
+--- a/strings.c
++++ b/strings.c
+@@ -124,7 +124,7 @@ main(argc, argv)
+ if (minlen == -1)
+ minlen = DEF_LEN;
+
+- if (!(bfr = malloc((u_int)minlen))) {
++ if (!(bfr = malloc((u_int)minlen + 1))) {
+ (void)fprintf(stderr, "strings: %s\n", strerror(errno));
+ exit(1);
+ }