]> git.pld-linux.org Git - packages/bsd-finger.git/blame - bsd-finger-gecos.patch
- store patches in decompressed files
[packages/bsd-finger.git] / bsd-finger-gecos.patch
CommitLineData
3df2a74d
RW
1diff -urN bsd-finger-0.17/finger/util.c bsd-finger-0.17.patch/finger/util.c
2--- bsd-finger-0.17/finger/util.c Wed Sep 29 00:53:58 1999
3+++ bsd-finger-0.17.patch/finger/util.c Wed May 9 16:47:17 2001
4@@ -147,10 +147,17 @@
5 }
6 }
7 rname[j] = 0;
8-
9- pn->realname = rname;
10 }
11-
12+ else {
13+ rname = (char*) malloc(sizeof(char));
14+ if (rname == NULL) {
15+ eprintf("finger: Out of space.\n");
16+ exit(1);
17+ }
18+ rname[0] = 0;
19+ }
20+
21+ pn->realname = rname;
22 pn->office = fields[1] ? strdup(fields[1]) : NULL;
23 pn->officephone = fields[2] ? strdup(fields[2]) : NULL;
24 pn->homephone = fields[3] ? strdup(fields[3]) : NULL;
This page took 0.080816 seconds and 4 git commands to generate.