diff -ur bsd-finger-0.17/finger/util.c bsd-finger-0.17-fixed/finger/util.c --- bsd-finger-0.17/finger/util.c 1999-09-29 00:53:58.000000000 +0200 +++ bsd-finger-0.17-fixed/finger/util.c 2003-11-30 06:19:35.000000000 +0100 @@ -147,9 +147,16 @@ } } rname[j] = 0; - - pn->realname = rname; } + else { + if (!(rname = (char *) malloc(sizeof(char)))) { + eprintf("finger: Out of space.\n"); + exit(1); + } + rname[0] = 0; + } + + pn->realname = rname; pn->office = fields[1] ? strdup(fields[1]) : NULL; pn->officephone = fields[2] ? strdup(fields[2]) : NULL;