Fossil SCM
Fix a potential NULL pointer dereference in search if the search index is not correct.
Commit
11ffd84a9a004512f139c8a68fb0e1d0f05c337f47f475d2c26e8c67ced88368
Parent
03e00a67d9f0aff…
1 file changed
+1
-1
+1
-1
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -1157,11 +1157,11 @@ | ||
| 1157 | 1157 | @ <li><p><a href='%R%s(zUrl)'>%h(zLabel)</a> |
| 1158 | 1158 | if( fDebug ){ |
| 1159 | 1159 | @ (%e(db_column_double(&q,3)), %s(db_column_text(&q,4)) |
| 1160 | 1160 | } |
| 1161 | 1161 | @ <br><span class='snippet'>%z(cleanSnippet(zSnippet)) \ |
| 1162 | - if( zDate && zDate[0] && strstr(zLabel,zDate)==0 ){ | |
| 1162 | + if( zLabel && zDate && zDate[0] && strstr(zLabel,zDate)==0 ){ | |
| 1163 | 1163 | @ <small>(%h(zDate))</small> |
| 1164 | 1164 | } |
| 1165 | 1165 | @ </span></li> |
| 1166 | 1166 | if( nLimit && nRow>=nLimit ) break; |
| 1167 | 1167 | } |
| 1168 | 1168 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -1157,11 +1157,11 @@ | |
| 1157 | @ <li><p><a href='%R%s(zUrl)'>%h(zLabel)</a> |
| 1158 | if( fDebug ){ |
| 1159 | @ (%e(db_column_double(&q,3)), %s(db_column_text(&q,4)) |
| 1160 | } |
| 1161 | @ <br><span class='snippet'>%z(cleanSnippet(zSnippet)) \ |
| 1162 | if( zDate && zDate[0] && strstr(zLabel,zDate)==0 ){ |
| 1163 | @ <small>(%h(zDate))</small> |
| 1164 | } |
| 1165 | @ </span></li> |
| 1166 | if( nLimit && nRow>=nLimit ) break; |
| 1167 | } |
| 1168 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -1157,11 +1157,11 @@ | |
| 1157 | @ <li><p><a href='%R%s(zUrl)'>%h(zLabel)</a> |
| 1158 | if( fDebug ){ |
| 1159 | @ (%e(db_column_double(&q,3)), %s(db_column_text(&q,4)) |
| 1160 | } |
| 1161 | @ <br><span class='snippet'>%z(cleanSnippet(zSnippet)) \ |
| 1162 | if( zLabel && zDate && zDate[0] && strstr(zLabel,zDate)==0 ){ |
| 1163 | @ <small>(%h(zDate))</small> |
| 1164 | } |
| 1165 | @ </span></li> |
| 1166 | if( nLimit && nRow>=nLimit ) break; |
| 1167 | } |
| 1168 |