fix -1 problem

This commit is contained in:
Ivana Varekova 2007-02-05 12:06:55 +00:00
parent d92c60c24c
commit 3a6cb19d96
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
- strcpy ( progName, argv[0] ); - strcpy ( progName, argv[0] );
+ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); + strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
+ progName[BZ_MAX_FILENAME]="\0"; + progName[BZ_MAX_FILENAME-1]="\0";
inFileName[0] = outFileName[0] = 0; inFileName[0] = outFileName[0] = 0;
fprintf ( stderr, fprintf ( stderr,

View File

@ -1,7 +1,7 @@
Summary: A file compression utility Summary: A file compression utility
Name: bzip2 Name: bzip2
Version: 1.0.4 Version: 1.0.4
Release: 2%{?dist} Release: 3%{?dist}
License: BSD License: BSD
Group: Applications/File Group: Applications/File
URL: http://sources.redhat.com/bzip2/ URL: http://sources.redhat.com/bzip2/
@ -105,7 +105,7 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/*so %{_libdir}/*so
%changelog %changelog
* Mon Feb 5 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-2 * Mon Feb 5 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-3
- Resolves: 226979 - Resolves: 226979
Buffer overflow in bzip2's bzip2recover Buffer overflow in bzip2's bzip2recover