]> git.pld-linux.org Git - packages/bsd-finger.git/commitdiff
1628285b7227440f74a66afa464be0ab bsd-finger-gecos.patch
authorRoman Werpachowski <roman.werpachowski@gmail.com>
Wed, 9 May 2001 14:53:36 +0000 (14:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bsd-finger-gecos.patch -> 1.1

bsd-finger-gecos.patch [new file with mode: 0644]

diff --git a/bsd-finger-gecos.patch b/bsd-finger-gecos.patch
new file mode 100644 (file)
index 0000000..8726425
--- /dev/null
@@ -0,0 +1,24 @@
+diff -urN bsd-finger-0.17/finger/util.c bsd-finger-0.17.patch/finger/util.c
+--- bsd-finger-0.17/finger/util.c      Wed Sep 29 00:53:58 1999
++++ bsd-finger-0.17.patch/finger/util.c        Wed May  9 16:47:17 2001
+@@ -147,10 +147,17 @@
+                       }
+               }
+               rname[j] = 0;
+-
+-              pn->realname = rname;
+       }
+-
++      else {
++              rname = (char*) malloc(sizeof(char));
++              if (rname == NULL) {
++                      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;
+       pn->homephone =   fields[3] ? strdup(fields[3]) : NULL;
This page took 0.067951 seconds and 4 git commands to generate.