#include "config.h"
#endif
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if 0
#ifndef lint
-__RCSID("$NetBSD: print-telnet.c,v 1.2 1999/10/11 12:40:12 sjg Exp $");
-#endif
+static const char rcsid[] =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.6 2000-01-17 06:24:26 itojun Exp $";
#endif
#include <sys/param.h>
x = *sp++; /* option */
length--;
if (x >= 0 && x < NTELOPTS) {
- (void)sprintf(tnet, "%s %s",
- telcmds[i], telopts[x]);
+ (void)snprintf(tnet, sizeof(tnet),
+ "%s %s", telcmds[i], telopts[x]);
} else {
- (void)sprintf(tnet, "%s %#x",
- telcmds[i], x);
+ (void)snprintf(tnet, sizeof(tnet),
+ "%s %#x", telcmds[i], x);
}
break;
default:
- (void)strcpy(tnet, telcmds[i]);
+ (void)snprintf(tnet, sizeof(tnet), "%s",
+ telcmds[i]);
}
if (c == SB) {
c = *sp++;