dest_len = sizeof(pstring);
}
- src_len = strlen_w(src) * sizeof(smb_ucs2_t);
+ src_len = strlen_w(src)* sizeof(smb_ucs2_t);
ret = convert_string(CH_UCS2, CH_DOS, src, src_len, dest, dest_len);
if (dest_len) dest[MIN(ret, dest_len-1)] = 0;
res = unmangle(u2);
if (res)
{
- ucs2_to_dos (s, res, 13); /* ugly, but must be done this way */
+
+ ucs2_to_dos (s, res, (strlen_w(res) * 2));
+ /* We MUST change this brainded interface,
+ we do not know how many chars will be used
+ in dos so i guess they will be no more than
+ double the size of the unicode string
+ ---simo */
DEBUG(10,("check_mangled_cache: returning -> [%s]\n", s));
ret = True;
}
res = _mangle(u2);
if (res) ucs2_to_dos (s, res, 13); /* ugly, but must be done this way */
- DEBUG(10,("mangle_name_83: returning -> [%s]\n", res?"True":"False"));
+ DEBUG(10,("mangle_name_83: returning -> [%s]\n", s));
SAFE_FREE(res);
SAFE_FREE(u2);
}