mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
d3d3ca97cd
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
25 lines
670 B
Diff
25 lines
670 B
Diff
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
|