summaryrefslogtreecommitdiffstats
path: root/uuencode.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-04-24 03:36:24 +0200
committerDamien Miller <djm@mindrot.org>2015-04-29 10:15:24 +0200
commit8ac2ffd7aa06042f6b924c87139f2fea5c5682f7 (patch)
tree51f246d468db99de6857cf69275fe820eb820576 /uuencode.c
parentupstream commit (diff)
downloadopenssh-8ac2ffd7aa06042f6b924c87139f2fea5c5682f7.tar.xz
openssh-8ac2ffd7aa06042f6b924c87139f2fea5c5682f7.zip
upstream commit
2*len -> use xreallocarray() ok djm
Diffstat (limited to 'uuencode.c')
-rw-r--r--uuencode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uuencode.c b/uuencode.c
index 294c74304..7fc867a11 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uuencode.c,v 1.27 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: uuencode.c,v 1.28 2015/04/24 01:36:24 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -82,7 +82,7 @@ dump_base64(FILE *fp, const u_char *data, u_int len)
fprintf(fp, "dump_base64: len > 65536\n");
return;
}
- buf = xmalloc(2*len);
+ buf = xreallocarray(NULL, 2, len);
n = uuencode(data, len, buf, 2*len);
for (i = 0; i < n; i++) {
fprintf(fp, "%c", buf[i]);