[1444] in Athena Bugs
lpq
daemon@ATHENA.MIT.EDU (John Carr)
Wed Nov 30 15:08:29 1988
To: bugs@ATHENA.MIT.EDU
Date: Wed, 30 Nov 88 15:08:00 EST
From: John Carr <jfc@ATHENA.MIT.EDU>
/source/4.3/ucb/lpr/displayq.c:
70 gethostname(name,sizeof(name)-1);
71 name[sizeof(name)-1] = '\0';
72 if (hp = gethostbyname(name))
73 (void) strncpy(name,hp->h_name,sizeof(name));
name is a pointer to char, not an array of char, so sizeof(name) is 4, not
the number of bytes in the array pointed to by name.
This code is only executed if there is no defined "rm" (remote machine) field
in pcap, so it shouldn't be executed too often.
--John Carr