diff --git a/units-1.88-coverity.patch b/units-1.88-coverity.patch index 412e2d5..cc46992 100644 --- a/units-1.88-coverity.patch +++ b/units-1.88-coverity.patch @@ -49,17 +49,16 @@ index cdda76a..c4230c9 100644 if (readerr == E_FILE) { if (errfile) fprintf(errfile, "%s: unable to open included file '%s' at line %d of file '%s\n", progname, includefile, linenum, file); -@@ -1381,7 +1384,8 @@ subunitroot(int n,char *in[], char *out[]) +@@ -1381,7 +1384,7 @@ subunitroot(int n,char *in[], char *out[]) char **ptr,**current; int count; - for(current = in;*current && *current==NULLUNIT;current++); + for(current = in;*current==NULLUNIT;current++) -+ if (!*current) return E_NOTROOT; count = 0; for(ptr=in;*ptr;ptr++){ if (*ptr==NULLUNIT) continue; -@@ -2618,7 +2622,7 @@ Typing 'search text' will show units whose names contain 'text'.\n\n", +@@ -2618,7 +2621,7 @@ Typing 'search text' will show units whose names contain 'text'.\n\n", int main(int argc, char **argv) { diff --git a/units.spec b/units.spec index 4d94507..761f39e 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 1.88 -Release: 4%{?dist} +Release: 5%{?dist} Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: http://www.gnu.org/software/units/units.html License: GPLv3+ @@ -59,6 +59,9 @@ fi %{_mandir}/man1/* %changelog +* Thu Nov 17 2011 Kamil Dudka - 1.88-5 +- improve the units-1.88-coverity.patch (thanks to Adrian Mariano) + * Wed Nov 16 2011 Kamil Dudka - 1.88-4 - fix code defects found by Coverity