Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libutil No need to quadruple a buffer because strunvis(3...
details: https://anonhg.NetBSD.org/src/rev/6d49a9ab9b1a
branches: trunk
changeset: 995562:6d49a9ab9b1a
user: alnsn <alnsn%NetBSD.org@localhost>
date: Thu Dec 27 21:35:48 2018 +0000
description:
No need to quadruple a buffer because strunvis(3) doesn't expand.
diffstat:
lib/libutil/getfsspecname.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 8331f02ff05f -r 6d49a9ab9b1a lib/libutil/getfsspecname.c
--- a/lib/libutil/getfsspecname.c Thu Dec 27 21:29:41 2018 +0000
+++ b/lib/libutil/getfsspecname.c Thu Dec 27 21:35:48 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getfsspecname.c,v 1.7 2018/10/06 23:48:00 christos Exp $ */
+/* $NetBSD: getfsspecname.c,v 1.8 2018/12/27 21:35:48 alnsn Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: getfsspecname.c,v 1.7 2018/10/06 23:48:00 christos Exp $");
+__RCSID("$NetBSD: getfsspecname.c,v 1.8 2018/12/27 21:35:48 alnsn Exp $");
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -108,7 +108,7 @@
#ifdef COMPAT_DKWEDGE
search:
#endif
- vname = malloc(strlen(name) * 4 + 1);
+ vname = malloc(strlen(name) + 1);
if (vname == NULL) {
savee = errno;
strlcpy(buf, "malloc failed", bufsiz);
Home |
Main Index |
Thread Index |
Old Index