fix another instance of buffer overflow for files with long names(#632384)

This commit is contained in:
Ondřej Vašík 2010-09-14 16:04:21 +02:00
parent 113120c783
commit 22dfc15b41
2 changed files with 14 additions and 1 deletions

View File

@ -10,3 +10,12 @@ diff -urNp star-1.5.1-orig/star/longnames.c star-1.5.1/star/longnames.c
return (TRUE);
}
@@ -198,7 +198,7 @@ name_to_tcb(info, ptb)
if (add)
strcatl(ptb->dbuf.t_name, &np[1], "/", (char *)NULL);
else
- strcpy(ptb->dbuf.t_name, &np[1]);
+ strncpy(ptb->dbuf.t_name, &np[1], props.pr_maxsname);
strncpy(ptb->dbuf.t_prefix, name, np - name);
info->f_flags |= F_SPLIT_NAME;
return (TRUE);

View File

@ -4,7 +4,7 @@
Summary: An archiving tool with ACL support
Name: star
Version: 1.5.1
Release: 3%{?dist}
Release: 4%{?dist}
URL: http://cdrecord.berlios.de/old/private/star.html
Source: ftp://ftp.berlios.de/pub/star/%{name}-%{version}.tar.bz2
@ -118,6 +118,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man4/star.4*
%changelog
* Tue Sep 14 2010 Ondrej Vasik <ovasik@redhat.com> 1.5.1-4
- fix another instance of buffer overflow for files with
long names(#632384)
* Tue Aug 17 2010 Ondrej Vasik <ovasik@redhat.com> 1.5.1-3
- Fix some invalid manpage references (#624612)
- ship star.4 manpage with star format description