summaryrefslogtreecommitdiff
path: root/uuencode.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-04-24 01:36:24 +0000
committerDamien Miller <djm@mindrot.org>2015-04-29 18:15:24 +1000
commit8ac2ffd7aa06042f6b924c87139f2fea5c5682f7 (patch)
tree51f246d468db99de6857cf69275fe820eb820576 /uuencode.c
parent657a5fbc0d0aff309079ff8fb386f17e964963c2 (diff)
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 @@
1/* $OpenBSD: uuencode.c,v 1.27 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: uuencode.c,v 1.28 2015/04/24 01:36:24 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -82,7 +82,7 @@ dump_base64(FILE *fp, const u_char *data, u_int len)
82 fprintf(fp, "dump_base64: len > 65536\n"); 82 fprintf(fp, "dump_base64: len > 65536\n");
83 return; 83 return;
84 } 84 }
85 buf = xmalloc(2*len); 85 buf = xreallocarray(NULL, 2, len);
86 n = uuencode(data, len, buf, 2*len); 86 n = uuencode(data, len, buf, 2*len);
87 for (i = 0; i < n; i++) { 87 for (i = 0; i < n; i++) {
88 fprintf(fp, "%c", buf[i]); 88 fprintf(fp, "%c", buf[i]);