rpms/star/devel star-1.5-changewarnSegv.patch, NONE, 1.1 star.spec, 1.36, 1.37
Peter Vrabec (pvrabec)
fedora-extras-commits at redhat.com
Mon Aug 27 11:55:43 UTC 2007
Author: pvrabec
Update of /cvs/extras/rpms/star/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16266
Modified Files:
star.spec
Added Files:
star-1.5-changewarnSegv.patch
Log Message:
fix segfault of data-change-warn option (#255261),
patch from dkopecek at redhat.com
star-1.5-changewarnSegv.patch:
--- NEW FILE star-1.5-changewarnSegv.patch ---
--- star-1.5/star/checkerr.c.orig-segv 2006-10-31 18:06:25.000000000 +0100
+++ star-1.5/star/checkerr.c 2007-08-27 11:42:39.000000000 +0200
@@ -183,44 +183,45 @@ LOCAL struct eflags {
*/
LOCAL UInt32_t
errflags(eflag, doexit)
- char *eflag;
- BOOL doexit;
+ char *eflag;
+ BOOL doexit;
{
- register char *p = eflag;
- char *ef = _endword(eflag);
- char ec;
- register struct eflags *ep;
- register int slen;
- register UInt32_t nflags = 0;
-
- ec = *ef;
- *ef = '\0';
- do {
- for (ep = eflags; ep->fname; ep++) {
- slen = strlen(ep->fname);
- if ((strncmp(ep->fname, p, slen) == 0) &&
- (p[slen] == '|' || p[slen] == ' ' ||
- p[slen] == '\0')) {
- nflags |= ep->fval;
- break;
- }
- }
- if (ep->fname == NULL) {
- if (doexit)
- comerrno(EX_BAD, "Bad flag '%s'\n", p);
- *ef = ec; /* Restore old character */
- return (0);
- }
- p = strchr(p, '|');
- } while (p && *p++ == '|');
-
- *ef = ec; /* Restore old character */
- if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
- if (doexit)
- comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
- return (0);
- }
- return (nflags);
+ register struct eflags *ep;
+ register int slen;
+ register UInt32_t nflags = 0;
+ char *curflags;
+ char *curflag;
+
+ curflags = strdup (eflag);
+ *_endword(curflags) = '\0';
+ curflag = strtok (curflags, "|");
+
+ while (curflag != NULL) {
+ for (ep = eflags; ep->fname; ep++) {
+ slen = strlen (ep->fname);
+ if ((strncmp (ep->fname, curflag, slen)) == 0) {
+ nflags |= ep->fval;
+ goto next;
+ }
+ }
+
+ if (doexit)
+ comerrno (EX_BAD, "Bad flag '%s' \n", curflag);
+
+ free (curflags);
+ return (0);
+ next:
+ curflag = strtok (NULL, "|");
+ }
+
+ free (curflags);
+
+ if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
+ if (doexit)
+ comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
+ return (0);
+ }
+ return (nflags);
}
LOCAL ec_t *
Index: star.spec
===================================================================
RCS file: /cvs/extras/rpms/star/devel/star.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- star.spec 24 Aug 2007 11:27:44 -0000 1.36
+++ star.spec 27 Aug 2007 11:55:11 -0000 1.37
@@ -4,11 +4,12 @@
Summary: An archiving tool with ACL support
Name: star
Version: 1.5a84
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://cdrecord.berlios.de/old/private/star.html
Source: ftp://ftp.berlios.de/pub/star/alpha/%{name}-%{version}.tar.bz2
Patch1: star-1.5-newMake.patch
Patch2: star-1.5-selinux.patch
+Patch3: star-1.5-changewarnSegv.patch
License: CDDL
Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -25,6 +26,7 @@
%if %{WITH_SELINUX}
%patch2 -p1 -b .selinux
%endif
+%patch3 -p1 -b .changewarnSegv
for PLAT in %{arm} x86_64 ppc64 s390 s390x; do
for AFILE in gcc cc; do
@@ -95,6 +97,10 @@
%{_mandir}/man1/spax.1*
%changelog
+* Mon Aug 27 2007 Peter Vrabec <pvrabec at redhat.com> 1.5a84-2
+- fix segfault of data-change-warn option (#255261),
+ patch from dkopecek at redhat.com
+
* Fri Aug 24 2007 Peter Vrabec <pvrabec at redhat.com> 1.5a84-1
- new upstream release with CVE-2007-4134 fix
More information about the fedora-extras-commits
mailing list