fix shadow-4.1.4.2-underflow.patch

This commit is contained in:
Peter Vrabec 2011-06-06 09:07:51 +02:00
parent 6e8f608032
commit 4d00d71784
2 changed files with 5 additions and 2 deletions

View file

@ -52,7 +52,7 @@ diff -up shadow-4.1.4.3/src/lastlog.c.underflow shadow-4.1.4.3/src/lastlog.c
- -
- if (offset <= (statbuf.st_size - sizeof (ll))) { - if (offset <= (statbuf.st_size - sizeof (ll))) {
+ offset = (off_t) pw->pw_uid * sizeof (ll); + offset = (off_t) pw->pw_uid * sizeof (ll);
+ if (offset + sizeof (ll) <= statbuf.st_size - sizeof (ll)) { + if (offset + sizeof (ll) <= statbuf.st_size) {
/* fseeko errors are not really relevant for us. */ /* fseeko errors are not really relevant for us. */
int err = fseeko (lastlogfile, offset, SEEK_SET); int err = fseeko (lastlogfile, offset, SEEK_SET);
assert (0 == err); assert (0 == err);

View file

@ -1,7 +1,7 @@
Summary: Utilities for managing accounts and shadow password files Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils Name: shadow-utils
Version: 4.1.4.3 Version: 4.1.4.3
Release: 2%{?dist} Release: 3%{?dist}
Epoch: 2 Epoch: 2
URL: http://pkg-shadow.alioth.debian.org/ URL: http://pkg-shadow.alioth.debian.org/
Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2 Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2
@ -200,6 +200,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/vigr.8* %{_mandir}/man8/vigr.8*
%changelog %changelog
* Mon Jun 06 2011 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.3-3
- fix shadow-4.1.4.2-underflow.patch
* Tue May 31 2011 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.3-2 * Tue May 31 2011 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.3-2
- fix integer underflow in laslog (#706321) - fix integer underflow in laslog (#706321)