From 5f95262bcecc05136368999e079973e4771b24a3 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 22 May 2014 11:52:58 -0500 Subject: [PATCH 1/1] win32_apply.c: Use sizeof(wchar_t) --- src/win32_apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32_apply.c b/src/win32_apply.c index f741b447..2926883c 100644 --- a/src/win32_apply.c +++ b/src/win32_apply.c @@ -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'\\'; -- 2.43.0