diff --git a/a2ps-overrun-static.patch b/a2ps-overrun-static.patch new file mode 100644 index 0000000..f8e592b --- /dev/null +++ b/a2ps-overrun-static.patch @@ -0,0 +1,12 @@ +diff -up a2ps-4.14/lib/metaseq.c.overrun-static a2ps-4.14/lib/metaseq.c +--- a2ps-4.14/lib/metaseq.c.overrun-static 2011-08-10 16:18:44.924915695 +0100 ++++ a2ps-4.14/lib/metaseq.c 2011-08-10 16:19:04.739555258 +0100 +@@ -334,7 +334,7 @@ grow_user_string_obstack (struct obstack + { + /* `%D{}' format run date with strftime() */ + for (j = 0, i += 2; +- j < sizeof (buf2) && str[i] && str[i] != '}'; ++ j < sizeof (buf2) - 1 && str[i] && str[i] != '}'; + i++, j++) + buf2[j] = str[i]; + if (str[i] != '}') diff --git a/a2ps.spec b/a2ps.spec index a23441e..2b0896b 100644 --- a/a2ps.spec +++ b/a2ps.spec @@ -31,6 +31,7 @@ Patch34: a2ps-external-libtool.patch Patch35: a2ps-4.14-texinfo-nodes.patch Patch36: a2ps-forward-null.patch Patch37: a2ps-overrun-dynamic.patch +Patch38: a2ps-overrun-static.patch Requires: fileutils sh-utils info BuildRequires: gperf BuildRequires: emacs, flex, libtool, texinfo, groff @@ -147,6 +148,9 @@ the emacs-%{name} package to use emacs-%{name} with GNU Emacs. # Coverity fix (overrun-dynamic). %patch37 -p1 -b .overrun-dynamic +# Coverity fix (overrun-static). +%patch38 -p1 -b .overrun-static + for file in AUTHORS ChangeLog; do iconv -f latin1 -t UTF-8 < $file > $file.utf8 touch -c -r $file $file.utf8 @@ -287,6 +291,7 @@ exit 0 %changelog * Wed Aug 10 2011 Tim Waugh - 4.14-13 +- Coverity fix (overrun-static). - Coverity fix (overrun-dynamic). - Coverity fix (forward-null).