projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
install with -s
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
optim.c
diff --git
a/usr/src/usr.bin/mail/optim.c
b/usr/src/usr.bin/mail/optim.c
index
fac2d55
..
3960c8a
100644
(file)
--- a/
usr/src/usr.bin/mail/optim.c
+++ b/
usr/src/usr.bin/mail/optim.c
@@
-1,4
+1,6
@@
-#
+#ifndef lint
+static char sccsid[] = "@(#)optim.c 2.10 (Berkeley) %G%";
+#endif
/*
* Mail -- a program for sending and receiving mail.
/*
* Mail -- a program for sending and receiving mail.
@@
-10,8
+12,6
@@
#include "configdefs.h"
#include <ctype.h>
#include "configdefs.h"
#include <ctype.h>
-static char *SccsId = "@(#)optim.c 2.8 %G%";
-
/*
* Map a name into the correct network "view" of the
* name. This is done by prepending the name with the
/*
* Map a name into the correct network "view" of the
* name. This is done by prepending the name with the
@@
-92,14
+92,15
@@
netlook(machine, attnet)
{
register struct netmach *np;
register char *cp, *cp2;
{
register struct netmach *np;
register char *cp, *cp2;
- char nbuf[
2
0];
+ char nbuf[
10
0];
/*
* Make into lower case.
*/
for (cp = machine, cp2 = nbuf; *cp; *cp2++ = little(*cp++))
/*
* Make into lower case.
*/
for (cp = machine, cp2 = nbuf; *cp; *cp2++ = little(*cp++))
- ;
+ if (cp2 >= &nbuf[sizeof(nbuf)-1])
+ break;
*cp2 = 0;
/*
*cp2 = 0;
/*