]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authorderaadt@openbsd.org <deraadt@openbsd.org>
Fri, 24 Apr 2015 01:36:24 +0000 (01:36 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 29 Apr 2015 08:15:24 +0000 (18:15 +1000)
2*len -> use xreallocarray() ok djm

uuencode.c

index 294c743046f36ca3a754d4bd08a5e8a8a8e32a89..7fc867a11fd9a8763b6fd419e5ddf8aaf87a1680 100644 (file)
@@ -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]);