X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/cdd66111973295c976f1a0bb57f571eba0513757..f97edba64d1fb2b28ac269fe588396643d271b7b:/openssh/uuencode.c?ds=inline diff --git a/openssh/uuencode.c b/openssh/uuencode.c index 0a7c8d1..a139495 100644 --- a/openssh/uuencode.c +++ b/openssh/uuencode.c @@ -1,3 +1,4 @@ +/* $OpenBSD: uuencode.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -23,7 +24,11 @@ */ #include "includes.h" -RCSID("$OpenBSD: uuencode.c,v 1.17 2003/11/10 16:23:41 jakob Exp $"); + +#include +#include +#include +#include #include "xmalloc.h" #include "uuencode.h" @@ -58,9 +63,14 @@ uudecode(const char *src, u_char *target, size_t targsize) void dump_base64(FILE *fp, u_char *data, u_int len) { - char *buf = xmalloc(2*len); + char *buf; int i, n; + if (len > 65536) { + fprintf(fp, "dump_base64: len > 65536\n"); + return; + } + buf = xmalloc(2*len); n = uuencode(data, len, buf, 2*len); for (i = 0; i < n; i++) { fprintf(fp, "%c", buf[i]);