summaryrefslogtreecommitdiff
path: root/pkg/blind/patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-04 17:54:21 -0700
committerMichael Forney <mforney@mforney.org>2019-06-04 20:41:14 -0700
commit80b9e8f11dfe52b3c45d65679bd167eb9888c4af (patch)
tree2443ef8b6dd0f2d809c82511714711276bb93c66 /pkg/blind/patch
parent0b563f2a71bffbca603869770bd89b745d95afa2 (diff)
blind: Use malloc instead of alloca
Diffstat (limited to 'pkg/blind/patch')
-rw-r--r--pkg/blind/patch/0001-Use-malloc-instead-of-alloca.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkg/blind/patch/0001-Use-malloc-instead-of-alloca.patch b/pkg/blind/patch/0001-Use-malloc-instead-of-alloca.patch
new file mode 100644
index 00000000..0b8eaf43
--- /dev/null
+++ b/pkg/blind/patch/0001-Use-malloc-instead-of-alloca.patch
@@ -0,0 +1,35 @@
+From 17e5acf6ce56870838bef5235fdb381d7e6d7327 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sat, 1 Jun 2019 14:57:42 -0700
+Subject: [PATCH] Use malloc instead of alloca
+
+---
+ src/blind-split.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/blind-split.c b/src/blind-split.c
+index e92fced..201fb6e 100644
+--- a/src/blind-split.c
++++ b/src/blind-split.c
+@@ -2,7 +2,6 @@
+ #include "stream.h"
+ #include "util.h"
+
+-#include <alloca.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <limits.h>
+@@ -38,8 +37,8 @@ main(int argc, char *argv[])
+ eprintf("%s: video is too large\n", stream.file);
+
+ parts = (size_t)argc / 2;
+- ends = alloca(parts * sizeof(*ends));
+- to_end = alloca(parts);
++ ends = emalloc(parts * sizeof(*ends));
++ to_end = emalloc(parts);
+
+ for (i = 0; i < parts; i++) {
+ to_end[i] = 0;
+--
+2.20.1
+