[a2ps] Coverity fix (overrun-dynamic).
Tim Waugh
twaugh at fedoraproject.org
Wed Aug 10 16:03:28 UTC 2011
commit 0a1ad205fadc96a43551b9ce15cd92fcc827a559
Author: Tim Waugh <twaugh at redhat.com>
Date: Wed Aug 10 16:46:55 2011 +0100
Coverity fix (overrun-dynamic).
a2ps-overrun-dynamic.patch | 21 +++++++++++++++++++++
a2ps.spec | 5 +++++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/a2ps-overrun-dynamic.patch b/a2ps-overrun-dynamic.patch
new file mode 100644
index 0000000..c50de44
--- /dev/null
+++ b/a2ps-overrun-dynamic.patch
@@ -0,0 +1,21 @@
+diff -up a2ps-4.14/lib/darray.c.overrun-dynamic a2ps-4.14/lib/darray.c
+--- a2ps-4.14/lib/darray.c.overrun-dynamic 2011-08-10 16:16:49.607014904 +0100
++++ a2ps-4.14/lib/darray.c 2011-08-10 16:17:10.965625881 +0100
+@@ -430,7 +430,7 @@ da_qsort (struct darray * arr)
+ jstack += 2;
+ /* Push pointers to larger subarry on stack.
+ * Process smaller subarrays now */
+- if (jstack > QSORT_STACK)
++ if (jstack >= QSORT_STACK)
+ error (da_exit_error, 0, "da_qsort: QSORT_STACK too small (%d)",
+ QSORT_STACK);
+ if (ir - i + 1 >= j - l) {
+@@ -509,7 +509,7 @@ da_qsort_with_arg (struct darray * arr,
+ jstack += 2;
+ /* Push pointers to larger subarry on stack.
+ * Process smaller subarrays now */
+- if (jstack > QSORT_STACK)
++ if (jstack >= QSORT_STACK)
+ error (da_exit_error, 0, "da_qsort: QSORT_STACK too small (%d)",
+ QSORT_STACK);
+ if (ir - i + 1 >= j - l) {
diff --git a/a2ps.spec b/a2ps.spec
index 3e145a6..a23441e 100644
--- a/a2ps.spec
+++ b/a2ps.spec
@@ -30,6 +30,7 @@ Patch31: a2ps-mb.patch
Patch34: a2ps-external-libtool.patch
Patch35: a2ps-4.14-texinfo-nodes.patch
Patch36: a2ps-forward-null.patch
+Patch37: a2ps-overrun-dynamic.patch
Requires: fileutils sh-utils info
BuildRequires: gperf
BuildRequires: emacs, flex, libtool, texinfo, groff
@@ -143,6 +144,9 @@ the emacs-%{name} package to use emacs-%{name} with GNU Emacs.
# Coverity fix (forward-null).
%patch36 -p1 -b .forward-null
+# Coverity fix (overrun-dynamic).
+%patch37 -p1 -b .overrun-dynamic
+
for file in AUTHORS ChangeLog; do
iconv -f latin1 -t UTF-8 < $file > $file.utf8
touch -c -r $file $file.utf8
@@ -283,6 +287,7 @@ exit 0
%changelog
* Wed Aug 10 2011 Tim Waugh <twaugh at redhat.com> - 4.14-13
+- Coverity fix (overrun-dynamic).
- Coverity fix (forward-null).
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.14-12
More information about the scm-commits
mailing list