aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/190_Strchop.patch16
-rw-r--r--debian/patches/series1
2 files changed, 17 insertions, 0 deletions
diff --git a/debian/patches/190_Strchop.patch b/debian/patches/190_Strchop.patch
new file mode 100644
index 0000000..e27861f
--- /dev/null
+++ b/debian/patches/190_Strchop.patch
@@ -0,0 +1,16 @@
+Subject: Check length for Strchop()
+From: Tatsuya Kinoshita <tats@debian.org>
+
+--- a/Str.c
++++ b/Str.c
+@@ -278,8 +278,8 @@ void
+ Strchop(Str s)
+ {
+ STR_LENGTH_CHECK(s);
+- while ((s->ptr[s->length - 1] == '\n' || s->ptr[s->length - 1] == '\r') &&
+- s->length > 0) {
++ while (s->length > 0 &&
++ (s->ptr[s->length - 1] == '\n' || s->ptr[s->length - 1] == '\r')) {
+ s->length--;
+ }
+ s->ptr[s->length] = '\0';
diff --git a/debian/patches/series b/debian/patches/series
index 8a7fe4f..71b3727 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,3 +17,4 @@
160_ignore-shy.patch
170_w3mman2html-utf8.patch
180_execdict.patch
+190_Strchop.patch