]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
win32_apply.c: Fix error message
[wimlib] / src / win32_apply.c
index f741b447e078322adf12d86f2d213f405a0b82d7..ee45acb4901fd79625903532bc205682917b272c 100644 (file)
@@ -482,7 +482,7 @@ build_win32_extraction_path(const struct wim_dentry *dentry,
        ctx->pathbuf.Length += ctx->target_ntpath.Length + sizeof(wchar_t);
        ctx->pathbuf.Buffer[ctx->pathbuf.Length / sizeof(wchar_t)] = L'\0';
 
-       wimlib_assert(ctx->pathbuf.Length >= 8 &&
+       wimlib_assert(ctx->pathbuf.Length >= 4 * sizeof(wchar_t) &&
                      !wmemcmp(ctx->pathbuf.Buffer, L"\\??\\", 4));
 
        ctx->pathbuf.Buffer[1] = L'\\';
@@ -1761,7 +1761,10 @@ end_extract_stream(struct wim_lookup_table_entry *stream, int status, void *_ctx
                        dentry = list_first_entry(&ctx->reparse_dentries,
                                                  struct wim_dentry, tmp_list);
                        build_extraction_path(dentry, ctx);
-                       ERROR("Invalid reparse point", current_path(ctx));
+                       ERROR("Reparse data of \"%ls\" has size "
+                             "%"PRIu64" bytes (exceeds %u bytes)",
+                             current_path(ctx), stream->size,
+                             REPARSE_DATA_MAX_SIZE);
                        return WIMLIB_ERR_INVALID_REPARSE_DATA;
                }
                /* In the WIM format, reparse streams are just the reparse data