Hello community, here is the log from the commit of package finger checked in at Fri May 4 00:07:53 CEST 2007. -------- --- finger/finger.changes 2007-03-02 10:34:45.000000000 +0100 +++ /mounts/work_src_done/STABLE/finger/finger.changes 2007-05-03 13:34:40.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Mar 27 08:08:40 CEST 2007 - mskibbe@suse.de + +- finger segfaults against files with a UTF-8 encoding and no LANG + environment variable( #247625 ) + +------------------------------------------------------------------- New: ---- finger-utf8_segfault.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ finger.spec ++++++ --- /var/tmp/diff_new_pack.J15724/_old 2007-05-04 00:06:59.000000000 +0200 +++ /var/tmp/diff_new_pack.J15724/_new 2007-05-04 00:06:59.000000000 +0200 @@ -16,12 +16,13 @@ Requires: netcfg Autoreqprov: on Version: 1.3 -Release: 41 +Release: 50 Summary: Show User Information (Client) BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: finger-bsd-%version.tar.bz2 Source1: finger.xinetd Source2: finger.firewall +Patch1: finger-utf8_segfault.patch %description Finger is a utility that allows users to see information about system @@ -47,6 +48,7 @@ %prep %setup -n finger-bsd-%version +%patch1 %build export CFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie" @@ -89,6 +91,9 @@ %{_sbindir}/in.fingerd %changelog +* Tue Mar 27 2007 - mskibbe@suse.de +- finger segfaults against files with a UTF-8 encoding and no LANG + environment variable( #247625 ) * Fri Mar 02 2007 - mskibbe@suse.de - change path to firewall script (#247352) * Wed Feb 28 2007 - mskibbe@suse.de ++++++ finger-utf8_segfault.patch ++++++ --- finger/sprint.c +++ finger/sprint.c @@ -49,6 +49,7 @@ PERSON *pn; WHERE *w; int cnt; + int i; char *p; PERSON **list; @@ -73,6 +74,9 @@ #define MAXREALNAME 20 #define MAXLOGINNAME 10 #define MAXHOSTNAME 20 + char *tmp = malloc( sizeof( char ) * MAXREALNAME ); + + printf ("%-*s %-*s %s %s\n", MAXLOGINNAME, "Login", MAXREALNAME, "Name", " Tty Idle Login Time ", (oflag) ? "Office Office Phone" : "Where"); @@ -81,9 +85,35 @@ pn = list[cnt]; for (w = pn->whead; w != NULL; w = w->next) { - printf ("%-*.*s %-*.*s ", MAXLOGINNAME, UT_NAMESIZE, - vs (pn->name), MAXREALNAME, MAXREALNAME, - pn->realname ? vs (pn->realname) : ""); + + if( strlen(pn->name) > MAXLOGINNAME ) + { + strncpy( tmp, pn->name, MAXLOGINNAME); + printf( "%s ", tmp ); + } + else + { + printf( "%s ", pn->name ); + for( i = strlen( pn->name ); i < MAXLOGINNAME; i ++ ) + { + printf( " " ); + } + } + + if( strlen(pn->realname) > MAXREALNAME ) + { + strncpy( tmp, pn->realname, MAXREALNAME); + printf( "%s ", tmp ); + } + else + { + printf( "%s ", pn->realname ); + for( i = strlen( pn->realname ); i < MAXREALNAME; i ++ ) + { + printf( " " ); + } + } + if (!w->loginat) { printf (" * * No logins "); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de