patch 9.1.0700: crash with 2byte encoding and glob2regpat()
Problem: possible crash with 2byte encoding and glob2regpat() Solution: Skip over character, if it is multi-byte character Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -5714,7 +5714,8 @@ file_pat_to_reg_pat(
|
||||
)
|
||||
*allow_dirs = TRUE;
|
||||
reg_pat[i++] = '\\';
|
||||
reg_pat[i++] = *p;
|
||||
if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
|
||||
reg_pat[i++] = *p++;
|
||||
}
|
||||
break;
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
|
||||
Reference in New Issue
Block a user