Bugfix for ntfs_mbstoucs_libntfscompat: Take the the \0 terminator into account when determining whether reallocing is necessary.

edge.strict_endians
Erik Larsson 2010-12-09 12:17:11 +01:00
parent e81fd0ee2a
commit 7a95c46e3d
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ static __inline__ int ntfs_mbstoucs_libntfscompat(const char *ins,
tmpstr_len = ntfs_mbstoucs(ins, &tmpstr);
if(tmpstr_len >= 0) {
if(tmpstr_len > outs_len) {
if((tmpstr_len + 1) > outs_len) {
/* Doing a realloc instead of reusing tmpstr
* because it emulates libntfs's mbstoucs more
* closely. */