Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/libarchive/dist/libarchive actually use the cop...
details: https://anonhg.NetBSD.org/src/rev/661b806651f6
branches: trunk
changeset: 790733:661b806651f6
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Oct 19 22:55:13 2013 +0000
description:
actually use the copied tmp_buf, for 3 byte-unaligned uudecode.
diffstat:
external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 070fd498d5da -r 661b806651f6 external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c
--- a/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c Sat Oct 19 22:55:01 2013 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c Sat Oct 19 22:55:13 2013 +0000
@@ -409,7 +409,7 @@
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 @@
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';
Home |
Main Index |
Thread Index |
Old Index