Module Name:    src
Committed By:   mrg
Date:           Sat Oct 19 22:55:13 UTC 2013

Modified Files:
        src/external/bsd/libarchive/dist/libarchive:
            archive_write_set_format_shar.c

Log Message:
actually use the copied tmp_buf, for 3 byte-unaligned uudecode.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
    src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c
diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.1.1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.2
--- src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c:1.1.1.2	Sat Feb 20 02:48:40 2010
+++ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c	Sat Oct 19 22:55:13 2013
@@ -409,7 +409,7 @@ uuencode_group(const char _in[3], char o
 static void
 uuencode_line(struct shar *shar, const char *inbuf, size_t len)
 {
-	char tmp_buf[3], *buf;
+	char *buf;
 	size_t alloc_len;
 
 	/* len <= 45 -> expanded to 60 + len byte + new line */
@@ -426,13 +426,15 @@ uuencode_line(struct shar *shar, const c
 		buf += 4;
 	}
 	if (len != 0) {
+		char tmp_buf[3];
+
 		tmp_buf[0] = inbuf[0];
 		if (len == 1)
 			tmp_buf[1] = '\0';
 		else
 			tmp_buf[1] = inbuf[1];
 		tmp_buf[2] = '\0';
-		uuencode_group(inbuf, buf);
+		uuencode_group(tmp_buf, buf);
 		buf += 4;
 	}
 	*buf++ = '\n';

Reply via email to