From: Eric Biggers Date: Tue, 24 Mar 2015 00:31:15 +0000 (-0500) Subject: extract.c: file_name_valid(): fix bad memdup X-Git-Tag: v1.8.1~70 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=c268a6111e676141c1eb13432cd46c77441a5b77 extract.c: file_name_valid(): fix bad memdup --- diff --git a/src/extract.c b/src/extract.c index 5b1c1cc6..68fab3fd 100644 --- a/src/extract.c +++ b/src/extract.c @@ -877,8 +877,7 @@ out_replace: utf16le_put_tstr(tchar_name); - dentry->d_extraction_name = memdup(fixed_name, - 2 * fixed_name_num_chars + 2); + dentry->d_extraction_name = TSTRDUP(fixed_name); if (!dentry->d_extraction_name) return WIMLIB_ERR_NOMEM; dentry->d_extraction_name_nchars = fixed_name_num_chars;