mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Don't use sizeof() on a pointer when we really wanted to measure
the length of the array. Noticed by: Christos Zoulas <christos@ZOULAS.COM> Obtained from: OpenBSD
This commit is contained in:
parent
fa2fbc3dac
commit
75dd9c65fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68890
@ -87,7 +87,7 @@ extern char *unptyip; /* pointer to remaining characters in buffer */
|
||||
#endif
|
||||
|
||||
extern int pty, net;
|
||||
extern char *line;
|
||||
extern char line[16];
|
||||
extern int SYNCHing; /* we are in TELNET SYNCH mode */
|
||||
|
||||
#ifndef P
|
||||
|
@ -480,14 +480,10 @@ getnpty()
|
||||
*
|
||||
* Returns the file descriptor of the opened pty.
|
||||
*/
|
||||
#ifndef __GNUC__
|
||||
char *line = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
#else
|
||||
static char Xline[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
char *line = Xline;
|
||||
#endif
|
||||
#ifdef CRAY
|
||||
char *myline = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
char myline[16];
|
||||
#else
|
||||
char line[16];
|
||||
#endif /* CRAY */
|
||||
|
||||
int
|
||||
|
@ -805,7 +805,6 @@ doit(who)
|
||||
#else
|
||||
for (;;) {
|
||||
char *lp;
|
||||
extern char *line, *getpty();
|
||||
|
||||
if ((lp = getpty()) == NULL)
|
||||
fatal(net, "Out of ptys");
|
||||
|
Loading…
Reference in New Issue
Block a user