Issue 66580 - crash in lingucomponent thesaurus
Summary: crash in lingucomponent thesaurus
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: thesaurus (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 10:37 UTC by thomas.lange
Modified: 2013-08-07 15:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.lange 2006-06-20 10:37:47 UTC
The following two stacks come from the crashreporter (the internal bug ID's are
130934 and 130690). The stacks look like this:

===============================================

00e1f4b8 64334eda lnth680mi!MyThes::binsearch(char* sw = 0965c910 "", char**
list = 00000000 , int nlst = 0)+0xb
[o:\src680\src.m1\lingucomponent\source\thesaurus\mythes\mythes.cxx @ 309]
00e1f5b0 64333444 lnth680mi!MyThes::Lookup(char* pText = 0cdeb9e8 "", int len =
0x965c910, mentry** pme = 00e1f608 )+0x57
[o:\src680\src.m1\lingucomponent\source\thesaurus\mythes\mythes.cxx @ 151]
00e1f648 64462d5c lnth680mi!Thesaurus::queryMeanings(rtl::OUString* rTerm =
00e1f6a0 , com::sun::star::lang::Locale* rLocale = 00e1f750 ,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>* rProperties
= 00e1f760 )+0x38e

===============================================

00e1dcb8 64334e7e lnth680mi!MyThes::binsearch(char* sw = 064dda18 "", char**
list = 064dd9f8 , int nlst = 0xffffffff)+0x52
[o:\src680\src.m3\lingucomponent\source\thesaurus\mythes\mythes.cxx @ 310]
00e1ddb0 643333e9 lnth680mi!MyThes::Lookup(char* pText = 05593d00 "", int len =
0x64dda18, mentry** pme = 00e1de08 )+0x57
[o:\src680\src.m3\lingucomponent\source\thesaurus\mythes\mythes.cxx @ 151]
00e1de48 64462d5c lnth680mi!Thesaurus::queryMeanings(rtl::OUString* rTerm =
00e1dea0 , com::sun::star::lang::Locale* rLocale = 00e1df50 ,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>* rProperties
= 00e1df60 )+0x333
[o:\src680\src.m3\lingucomponent\source\thesaurus\libnth\nthesimp.cxx @ 380]

===============================================

The first has a report count of 37 and the second of 6.

The respective code part is

int MyThes::binsearch(char * sw, char* list[], int nlst) 
{
    int lp, up, mp, j, indx;
    lp = 0;
    up = nlst-1;
    indx = -1;
    if (strcmp(sw,list[lp]) < 0) return -1;
    if (strcmp(sw,list[up]) > 0) return -1;

The first crash takes place in the line with the first 'strcmp' and the second
crash in the following line.

Looking in the source code of m172 the line
    int idx = nw > 0 ? binsearch(wrd,list,nw) : -1;
seems to already take care of the second crash.
But it seems to me 'list' should be checked against NULL as well to guard
against the first crash.
Comment 1 Mathias_Bauer 2007-12-04 16:40:00 UTC
target 3.0
Comment 2 Martin Hollmichel 2008-08-18 14:36:36 UTC
set target 3.x