-
Shishir Jaiswal authored
FT_PARSER.C:92 DESCRIPTION =========== Starting the server with default charset as 'utf16le', and setting system variable "ft_boolean_syntax" results in server crash. ANALYSIS ======== Function "ft_boolean_check_syntax_string()" uses the MACRO "my_isalnum" which checks for the member "ctype" of the default charset. Since this member is NULL (for charset 'utf16le') therefore when accessed, results in SEGFAULT! We can prevent it altogether by replacing "my_isalnum" (which depends on the default charset) with C's "isalnum()" . Using "isalnum()" here is sufficient as the input to this function is guaranteed to be in ASCII format. FIX === Replaced user defined "my_isalnum" with C's "isalnum()" in the function "ft_boolean_check_syntax_string()"
Shishir Jaiswal authoredFT_PARSER.C:92 DESCRIPTION =========== Starting the server with default charset as 'utf16le', and setting system variable "ft_boolean_syntax" results in server crash. ANALYSIS ======== Function "ft_boolean_check_syntax_string()" uses the MACRO "my_isalnum" which checks for the member "ctype" of the default charset. Since this member is NULL (for charset 'utf16le') therefore when accessed, results in SEGFAULT! We can prevent it altogether by replacing "my_isalnum" (which depends on the default charset) with C's "isalnum()" . Using "isalnum()" here is sufficient as the input to this function is guaranteed to be in ASCII format. FIX === Replaced user defined "my_isalnum" with C's "isalnum()" in the function "ft_boolean_check_syntax_string()"
Loading