diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-11-12 06:03:03 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-11-12 06:24:36 +0700 |
commit | d3d3ca97cd35d7c8c02117f35d4e788aebc9ede0 (patch) | |
tree | 948d60bc4fbd3cdac0841c7775751415b91ecda2 /system/vbindiff/vbindiff-prevent-segfault.patch | |
parent | 8c8738cf7c8e6af412a737565981bed49f369557 (diff) | |
download | slackbuilds-d3d3ca97cd35d7c8c02117f35d4e788aebc9ede0.tar.gz |
system/vbindiff: Fix segfault.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/vbindiff/vbindiff-prevent-segfault.patch')
-rw-r--r-- | system/vbindiff/vbindiff-prevent-segfault.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/system/vbindiff/vbindiff-prevent-segfault.patch b/system/vbindiff/vbindiff-prevent-segfault.patch new file mode 100644 index 0000000000..2b6c173f0b --- /dev/null +++ b/system/vbindiff/vbindiff-prevent-segfault.patch @@ -0,0 +1,25 @@ +From 879a63ac5f0ffdbe7350ccc7438692a6669d26f2 Mon Sep 17 00:00:00 2001 +From: Peter Ross <pross@xvid.org> +Date: Sat, 22 Feb 2014 22:50:54 +1100 +Subject: [PATCH] vbindiff: prevent segfault when comparing files of different + length + +--- + vbindiff.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/vbindiff.cpp b/vbindiff.cpp +index 116a037..a032bc6 100644 +--- a/vbindiff.cpp ++++ b/vbindiff.cpp +@@ -487,6 +487,8 @@ void FileDisplay::display() + + buf[index++] = displayTable[data->line[i][j]]; + } ++ if (index < 0) ++ index = 0; + memset(buf + index, ' ', sizeof(buf) - index - 1); + memset(str, ' ', screenWidth - (str - buf2)); + +-- +1.8.3.2 |