]> wimlib.net Git - wimlib/blobdiff - src/ntfs-3g_apply.c
{lzx,lzms-decompress.c}: Allocate context with DECODE_TABLE_ALIGNMENT
[wimlib] / src / ntfs-3g_apply.c
index ff145a61871a2cc98184bd9599672b8a0085ee7b..59edc3631fa7a42e4654d0c57babbd412c9b2f58 100644 (file)
@@ -627,7 +627,6 @@ ntfs_3g_create_nondirectory(struct wim_inode *inode,
 
        /* Create additional links if present.  */
        next = inode->i_extraction_aliases.next;
-       ret = 0;
        do {
                dentry = list_entry(next, struct wim_dentry,
                                    d_extraction_alias_node);
@@ -726,6 +725,11 @@ ntfs_3g_begin_extract_stream_to_attr(struct wim_lookup_table_entry *stream,
                return WIMLIB_ERR_NTFS_3G;
        }
 
+       if (ctx->num_open_attrs == MAX_OPEN_ATTRS) {
+               ERROR("Can't extract data: too many open files!");
+               return WIMLIB_ERR_UNSUPPORTED;
+       }
+
        attr = ntfs_attr_open(ni, AT_DATA, stream_name, stream_name_nchars);
        if (!attr) {
                ERROR_WITH_ERRNO("Failed to open data stream of \"%s\"",