Don't use regerror() result as format string.

This commit is contained in:
Tim Waugh 2017-05-15 11:56:24 +01:00
parent 9a39436e3b
commit 8cf335f1b3
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,21 @@
diff -up patchutils-0.3.4/src/filterdiff.c.format-str patchutils-0.3.4/src/filterdiff.c
--- patchutils-0.3.4/src/filterdiff.c.format-str 2017-05-15 11:54:20.203918650 +0100
+++ patchutils-0.3.4/src/filterdiff.c 2017-05-15 11:54:58.631833806 +0100
@@ -1355,7 +1355,7 @@ read_regex_file (const char *file)
char errstr[300];
regerror (err, &regex[num_regex - 1], errstr,
sizeof (errstr));
- error (EXIT_FAILURE, 0, errstr);
+ error (EXIT_FAILURE, 0, "%s", errstr);
exit (1);
}
}
@@ -1613,7 +1613,7 @@ int main (int argc, char *argv[])
char errstr[300];
regerror (err, &regex[num_regex - 1], errstr,
sizeof (errstr));
- error (EXIT_FAILURE, 0, errstr);
+ error (EXIT_FAILURE, 0, "%s", errstr);
exit (1);
}
}

View File

@ -1,7 +1,7 @@
Summary: A collection of programs for manipulating patch files
Name: patchutils
Version: 0.3.4
Release: 6%{?dist}
Release: 7%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://cyberelk.net/tim/patchutils/
@ -49,6 +49,9 @@ rm -rf %{buildroot}
%{_mandir}/*/*
%changelog
* Mon May 15 2017 Tim Waugh <twaugh@redhat.com> - 0.3.4-7
- Don't use regerror() result as format string.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild