Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src - bump buffer sizes to avoid potential truncation issues
details: https://anonhg.NetBSD.org/src/rev/40937da3dbc4
branches: trunk
changeset: 996528:40937da3dbc4
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Feb 04 04:36:41 2019 +0000
description:
- bump buffer sizes to avoid potential truncation issues
diffstat:
bin/pax/ar_io.c | 6 +++---
crypto/external/bsd/openssh/dist/fmt_scaled.h | 4 ++--
crypto/external/bsd/openssh/dist/scp.c | 6 +++---
libexec/telnetd/utility.c | 6 +++---
sbin/bioctl/bioctl.c | 8 ++++----
5 files changed, 15 insertions(+), 15 deletions(-)
diffs (129 lines):
diff -r 2ba47ca04ce6 -r 40937da3dbc4 bin/pax/ar_io.c
--- a/bin/pax/ar_io.c Mon Feb 04 04:20:13 2019 +0000
+++ b/bin/pax/ar_io.c Mon Feb 04 04:36:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_io.c,v 1.58 2017/10/02 21:57:59 joerg Exp $ */
+/* $NetBSD: ar_io.c,v 1.59 2019/02/04 04:36:41 mrg Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.58 2017/10/02 21:57:59 joerg Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.59 2019/02/04 04:36:41 mrg Exp $");
#endif
#endif /* not lint */
@@ -1631,7 +1631,7 @@
ar_summary(int n)
{
time_t secs;
- char buf[BUFSIZ];
+ char buf[4096];
char tbuf[MAXPATHLEN/4]; /* XXX silly size! */
char s1buf[MAXPATHLEN/8]; /* XXX very silly size! */
char s2buf[MAXPATHLEN/8]; /* XXX very silly size! */
diff -r 2ba47ca04ce6 -r 40937da3dbc4 crypto/external/bsd/openssh/dist/fmt_scaled.h
--- a/crypto/external/bsd/openssh/dist/fmt_scaled.h Mon Feb 04 04:20:13 2019 +0000
+++ b/crypto/external/bsd/openssh/dist/fmt_scaled.h Mon Feb 04 04:36:41 2019 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: fmt_scaled.h,v 1.7 2017/04/18 18:41:46 christos Exp $ */
+/* $NetBSD: fmt_scaled.h,v 1.8 2019/02/04 04:36:41 mrg Exp $ */
#ifndef FMT_SCALED_STRSIZE
-#define FMT_SCALED_STRSIZE 7
+#define FMT_SCALED_STRSIZE 40
#endif
int fmt_scaled(long long, char *);
int scan_scaled(const char *, long long *);
diff -r 2ba47ca04ce6 -r 40937da3dbc4 crypto/external/bsd/openssh/dist/scp.c
--- a/crypto/external/bsd/openssh/dist/scp.c Mon Feb 04 04:20:13 2019 +0000
+++ b/crypto/external/bsd/openssh/dist/scp.c Mon Feb 04 04:36:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scp.c,v 1.21 2019/01/27 02:08:33 pgoyette Exp $ */
+/* $NetBSD: scp.c,v 1.22 2019/02/04 04:36:41 mrg Exp $ */
/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
/*
@@ -74,7 +74,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: scp.c,v 1.21 2019/01/27 02:08:33 pgoyette Exp $");
+__RCSID("$NetBSD: scp.c,v 1.22 2019/02/04 04:36:41 mrg Exp $");
#include <sys/param.h> /* roundup MAX */
#include <sys/types.h>
@@ -911,7 +911,7 @@
{
DIR *dirp;
struct dirent *dp;
- char *last, *vect[1], path[PATH_MAX];
+ char *last, *vect[1], path[PATH_MAX + 20];
if (!(dirp = opendir(name))) {
run_err("%s: %s", name, strerror(errno));
diff -r 2ba47ca04ce6 -r 40937da3dbc4 libexec/telnetd/utility.c
--- a/libexec/telnetd/utility.c Mon Feb 04 04:20:13 2019 +0000
+++ b/libexec/telnetd/utility.c Mon Feb 04 04:36:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utility.c,v 1.32 2012/01/09 16:36:48 christos Exp $ */
+/* $NetBSD: utility.c,v 1.33 2019/02/04 04:36:41 mrg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: utility.c,v 1.32 2012/01/09 16:36:48 christos Exp $");
+__RCSID("$NetBSD: utility.c,v 1.33 2019/02/04 04:36:41 mrg Exp $");
#endif
#endif /* not lint */
@@ -717,7 +717,7 @@
break;
}
{
- char tbuf[32];
+ char tbuf[40];
(void)snprintf(tbuf, sizeof tbuf, "%s%s%s%s%s",
pointer[2]&MODE_EDIT ? "|EDIT" : "",
diff -r 2ba47ca04ce6 -r 40937da3dbc4 sbin/bioctl/bioctl.c
--- a/sbin/bioctl/bioctl.c Mon Feb 04 04:20:13 2019 +0000
+++ b/sbin/bioctl/bioctl.c Mon Feb 04 04:36:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $ */
+/* $NetBSD: bioctl.c,v 1.18 2019/02/04 04:36:41 mrg Exp $ */
/* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */
/*
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $");
+__RCSID("$NetBSD: bioctl.c,v 1.18 2019/02/04 04:36:41 mrg Exp $");
#endif
#include <sys/types.h>
@@ -237,7 +237,7 @@
struct bioc_vol bv;
const char *status, *rtypestr, *stripestr;
char size[64], percent[16], seconds[20];
- char rtype[16], stripe[16], tmp[32];
+ char rtype[16], stripe[16], tmp[48];
rtypestr = stripestr = NULL;
@@ -345,7 +345,7 @@
{
struct bioc_disk bd;
const char *status;
- char size[64], serial[32], scsiname[16];
+ char size[64], serial[32], scsiname[34];
memset(&bd, 0, sizeof(bd));
bd.bd_cookie = bl.bl_cookie;
Home |
Main Index |
Thread Index |
Old Index