Deleted Added
full compact
21c21
< * $FreeBSD: head/contrib/tcpdump/print-icmp.c 56896 2000-01-30 01:05:24Z fenner $
---
> * $FreeBSD: head/contrib/tcpdump/print-icmp.c 66644 2000-10-05 02:49:49Z kris $
180c180
< char buf[256];
---
> char buf[MAXHOSTNAMELEN + 100];
201c201
< (void)sprintf(buf, "%s protocol %d unreachable",
---
> (void)snprintf(buf, sizeof(buf), "%s protocol %d unreachable",
215c215
< (void)sprintf(buf,
---
> (void)snprintf(buf, sizeof(buf),
222c222
< (void)sprintf(buf,
---
> (void)snprintf(buf, sizeof(buf),
229c229
< (void)sprintf(buf,
---
> (void)snprintf(buf, sizeof(buf),
244c244
< (void)sprintf(buf,
---
> (void)snprintf(buf, sizeof(buf),
248c248
< (void)sprintf(buf,
---
> (void)snprintf(buf, sizeof(buf),
257c257
< (void)sprintf(buf, fmt,
---
> (void)snprintf(buf, sizeof(buf), fmt,
267c267
< (void)sprintf(buf, fmt,
---
> (void)snprintf(buf, sizeof(buf), fmt,
287c287
< (void)sprintf(cp, "%u", lifetime);
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u", lifetime);
289c289
< (void)sprintf(cp, "%u:%02u",
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u:%02u",
292c292
< (void)sprintf(cp, "%u:%02u:%02u",
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u:%02u:%02u",
299c299
< (void)sprintf(cp, " %d:", num);
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), " %d:", num);
304c304
< (void)sprintf(cp, " [size %d]", size);
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), " [size %d]", size);
310c310
< (void)sprintf(cp, " {%s %u}",
---
> (void)snprintf(cp, sizeof(buf) - strlen(buf), " {%s %u}",
331c331
< (void)sprintf(buf, "time exceeded-#%d", dp->icmp_code);
---
> (void)snprintf(buf, sizeof(buf), "time exceeded-#%d", dp->icmp_code);
338c338
< (void)sprintf(buf, "parameter problem - code %d",
---
> (void)snprintf(buf, sizeof(buf), "parameter problem - code %d",
342c342
< (void)sprintf(buf, "parameter problem - octet %d",
---
> (void)snprintf(buf, sizeof(buf), "parameter problem - octet %d",
349c349
< (void)sprintf(buf, "address mask is 0x%08x",
---
> (void)snprintf(buf, sizeof(buf), "address mask is 0x%08x",