diff options
Diffstat (limited to 'lib/libarchive/archive_write_set_format_pax.c')
-rw-r--r-- | lib/libarchive/archive_write_set_format_pax.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libarchive/archive_write_set_format_pax.c b/lib/libarchive/archive_write_set_format_pax.c index 54e8581..547ada9 100644 --- a/lib/libarchive/archive_write_set_format_pax.c +++ b/lib/libarchive/archive_write_set_format_pax.c @@ -208,6 +208,9 @@ add_pax_attr_w(struct archive_string *as, const char *key, const wchar_t *wval) } utf8_value = malloc(utf8len + 1); + if (utf8_value == NULL) + __archive_errx(1, "Not enough memory for attributes"); + for (wp = wval, p = utf8_value; *wp != L'\0'; ) { wc = *wp++; if (wc <= 0x7f) { |