stripped_nchars = ret;
target = rpdata.substitute_name;
target_nchars = rpdata.substitute_name_nbytes / sizeof(utf16lechar);
- stripped_target = target + 6;
+ stripped_target = target + stripped_nchars;
stripped_target_nchars = target_nchars - stripped_nchars;
new_target = alloca((6 + extract_root_realpath_nchars +
p = new_target;
if (stripped_nchars == 6) {
/* Include \??\ prefix if it was present before */
- wmemcpy(p, L"\\??\\", 4);
- p += 4;
+ p = wmempcpy(p, L"\\??\\", 4);
}
/* Print name excludes the \??\ if present. */