1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

fixed parsing of broken NT short name

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent cdf4c4c812
commit 9e4b352945

View File

@ -126,7 +126,7 @@ static int interpret_long_filename(int level,char *p,file_info *finfo)
p += 2;
if (p[1] == 0 && slen > 1) {
/* NT has stuffed up again */
unistr_to_ascii(finfo->short_name, p, 24);
unistr_to_ascii(finfo->short_name, p, slen/2);
} else {
strncpy(finfo->short_name, p, 12);
finfo->short_name[12] = 0;