summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Klapper <a9016009@gmx.de>2009-02-25 18:18:18 +0000
committerAndre Klapper <aklapper@src.gnome.org>2009-02-25 18:18:18 +0000
commitd3262503964fc12fae2175dee0a69c28f920006f (patch)
tree25f9337ba0e67ba01b0ae55293d1bb5860350d5f
parent75382561df242984e75b347acc0e745b2be34bb4 (diff)
downloadyelp-d3262503964fc12fae2175dee0a69c28f920006f.tar.gz
Fix crash. Patch by Antonio Litterio. Fixes bug #552947.
2009-02-25 Andre Klapper <a9016009@gmx.de> * src/yelp-search-parser.c (search_clean_snippet): Fix crash. Patch by Antonio Litterio. Fixes bug #552947. svn path=/trunk/; revision=3220
-rw-r--r--ChangeLog5
-rw-r--r--src/yelp-search-parser.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8dc27a2d..43ecc2d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-25 Andre Klapper <a9016009@gmx.de>
+
+ * src/yelp-search-parser.c (search_clean_snippet):
+ Fix crash. Patch by Antonio Litterio. Fixes bug #552947.
+
2008-12-23 Josselin Mouette <joss@malsain.org>
* src/yelp-window.c: (window_do_load_html):
diff --git a/src/yelp-search-parser.c b/src/yelp-search-parser.c
index 06938cc0..9be5c43f 100644
--- a/src/yelp-search-parser.c
+++ b/src/yelp-search-parser.c
@@ -1232,10 +1232,14 @@ search_clean_snippet (gchar *snippet, gchar **terms)
while ((str = strstr (result, (iteration[i])))) {
gboolean breaking = FALSE;
- gint i;
- for (i=0; i< count; i++) {
+ gint k;
+ for (k=0; k< count; k++) {
+ if(iteration[k] == NULL){
+ breaking = TRUE;
+ break;
+ }
str++;
- str = strstr (str, (iteration[i]));
+ str = strstr (str, (iteration[k]));
if (!str) {
breaking = TRUE;
break;