Skip Menu |

This queue is for tickets about the Text-Aspell CPAN distribution.

Report information
The Basics
Id: 8633
Status: resolved
Priority: 0/
Queue: Text-Aspell

People
Owner: Nobody in particular
Requestors: at [...] altlinux.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: (no value)



Subject: get_option_as_list segfaults
Hello, When en_US dictionary is not available, get_option_as_list prodices segfault: $ perl -Mblib t/*.t ... ok 11 not ok 12 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 54. not ok 13 not ok 14 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 59. not ok 15 not ok 16 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 63. Use of uninitialized value in join or string at t/test.t line 63. ok 17 not ok 18 not ok 19 zsh: segmentation fault perl -Mblib t/*.t $ This is because self->speller is NULL and thus cannot be dereferenced as an argument to aspell_speller_error_message. The attached patch proposes a fix. Thanks, -- Alexey Tourbin ALT Linux Team
When en_US dictionary is not available, get_option_as_list prodices segfault: $ perl -Mblib t/*.t ... ok 11 not ok 12 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 54. not ok 13 not ok 14 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 59. not ok 15 not ok 16 No word lists can be found for the language "en_US". Use of uninitialized value in string eq at t/test.t line 63. Use of uninitialized value in join or string at t/test.t line 63. ok 17 not ok 18 not ok 19 zsh: segmentation fault perl -Mblib t/*.t $ This is because self->speller is NULL and thus cannot be dereferenced as an argument to aspell_speller_error_message. --- Text-Aspell-0.04/Aspell.xs- 2003-08-03 15:11:55 +0000 +++ Text-Aspell-0.04/Aspell.xs 2004-11-27 22:06:35 +0000 @@ -192,6 +192,7 @@ get_option_as_list(self, val) if ( (self->errnum = aspell_config_error_number( (const AspellConfig *)self->config) ) ) { + if (self->speller) strncpy(self->lastError, (char*) aspell_speller_error_message(self->speller), MAX_ERRSTR_LEN); delete_aspell_string_list(lst); XSRETURN_UNDEF;
Version .05 now doesn't use self->speller in that function. That was an error in previous versions. Thanks.