Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 149397 Details for
Bug 84611
rundig dumps core
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix segfaults in htfuzzy
htdig-3.2.0b6-segfault.patch (text/plain), 3.65 KB, created by
Gilles Detillieux
on 2007-03-06 22:36:42 UTC
(
hide
)
Description:
patch to fix segfaults in htfuzzy
Filename:
MIME Type:
Creator:
Gilles Detillieux
Created:
2007-03-06 22:36:42 UTC
Size:
3.65 KB
patch
obsolete
>--- htdig-3.2.0b6/htfuzzy/Regexp.cc.orig 2004-05-28 08:15:20.000000000 -0500 >+++ htdig-3.2.0b6/htfuzzy/Regexp.cc 2007-03-06 15:48:03.000000000 -0600 >@@ -73,16 +73,16 @@ > int wordCount = 0; > int maximumWords = config.Value("regex_max_words", 25); > >- wordList->Start_Get(); >- while (wordCount < maximumWords && (key = (String *) wordList->Get_Next())) >- { >- if (regexMatch.match(*key, 0, 0) != 0) >- { >- words.Add(new String(*key)); >- wordCount++; >- } >- } > if (wordList) { >+ wordList->Start_Get(); >+ while (wordCount < maximumWords && (key = (String *) wordList->Get_Next())) >+ { >+ if (regexMatch.match(*key, 0, 0) != 0) >+ { >+ words.Add(new String(*key)); >+ wordCount++; >+ } >+ } > wordList->Destroy(); > delete wordList; > } >--- htdig-3.2.0b6/htfuzzy/Substring.cc.orig 2004-05-28 08:15:20.000000000 -0500 >+++ htdig-3.2.0b6/htfuzzy/Substring.cc 2007-03-06 15:48:34.000000000 -0600 >@@ -73,16 +73,16 @@ > int wordCount = 0; > int maximumWords = config.Value("substring_max_words", 25); > >- wordList->Start_Get(); >- while (wordCount < maximumWords && (key = (String *) wordList->Get_Next())) >- { >- if (match.FindFirst((char*)*key) >= 0) >- { >- words.Add(new String(*key)); >- wordCount++; >- } >- } > if (wordList) { >+ wordList->Start_Get(); >+ while (wordCount < maximumWords && (key = (String *) wordList->Get_Next())) >+ { >+ if (match.FindFirst((char*)*key) >= 0) >+ { >+ words.Add(new String(*key)); >+ wordCount++; >+ } >+ } > wordList->Destroy(); > delete wordList; > } >--- htdig-3.2.0b6/htfuzzy/htfuzzy.cc.orig 2004-05-28 08:15:20.000000000 -0500 >+++ htdig-3.2.0b6/htfuzzy/htfuzzy.cc 2007-03-06 15:53:04.000000000 -0600 >@@ -153,8 +153,9 @@ > String word, fuzzyKey; > int count = 0; > >- words->Start_Get(); >- while ((key = (String *) words->Get_Next())) >+ if (words) >+ words->Start_Get(); >+ while (words && (key = (String *) words->Get_Next())) > { > word = *key; > wordAlgorithms.Start_Get(); >@@ -185,8 +186,11 @@ > fuzzy->writeDB(); > } > worddb.Close(); >- words->Destroy(); >- delete words; >+ if (words) >+ { >+ words->Destroy(); >+ delete words; >+ } > if (fuzzy) > delete fuzzy; > } >--- htdig-3.2.0b6/htfuzzy/Prefix.cc.orig 2004-05-28 08:15:20.000000000 -0500 >+++ htdig-3.2.0b6/htfuzzy/Prefix.cc 2007-03-06 15:58:13.000000000 -0600 >@@ -99,9 +99,10 @@ > WordReference *word_ref; > String last_word; > >- wordList->Start_Get(); >- while (wordCount < maximumWords && (word_ref = (WordReference *) wordList->Get_Next() )) >- { >+ if (wordList) { >+ wordList->Start_Get(); >+ while (wordCount < maximumWords && (word_ref = (WordReference *) wordList->Get_Next() )) >+ { > s = word_ref->Key().GetWord(); > > // If we're somehow past the original word, we're done >@@ -115,8 +116,7 @@ > last_word = s; > words.Add(new String(s)); > wordCount++; >- } >- if (wordList) { >+ } > wordList->Destroy(); > delete wordList; > } >--- htdig-3.2.0b6/htfuzzy/Fuzzy.cc.orig 2004-05-28 08:15:20.000000000 -0500 >+++ htdig-3.2.0b6/htfuzzy/Fuzzy.cc 2007-03-06 12:51:54.000000000 -0600 >@@ -61,7 +61,11 @@ > delete index; > index = 0; > } >- delete dict; >+ if (dict) >+ { >+ delete dict; >+ dict = 0; >+ } > } > > >@@ -154,8 +158,9 @@ > > int count = 0; > >- dict->Start_Get(); >- while ((fuzzyKey = dict->Get_Next())) >+ if (dict) >+ dict->Start_Get(); >+ while (dict && (fuzzyKey = dict->Get_Next())) > { > s = (String *) dict->Find(fuzzyKey); > index->Put(fuzzyKey, *s);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 84611
: 149397