Fossil SCM

Resolved timeline segfault reported in [forum:0bbb66eee4ba35db|forum post 0bbb66eee4ba35db], triggered by entries with NULL checkin messages.

stephan 2022-08-14 19:33 trunk
Commit 20eab7859231cd388514bf3784066065fdb4515be9733e50c8f332ffff84f795
1 file changed +4
--- src/timeline.c
+++ src/timeline.c
@@ -2777,10 +2777,14 @@
27772777
){
27782778
Blob r, co;
27792779
int i, j;
27802780
blob_init(&r, 0, 0);
27812781
blob_init(&co, 0, 0);
2782
+
2783
+ if( 0==zCom ){
2784
+ zCom = "(NULL)";
2785
+ }
27822786
27832787
/* Replace LF and tab with space, delete CR */
27842788
while( zCom[0] ){
27852789
for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){}
27862790
blob_append(&co, zCom, j);
27872791
--- src/timeline.c
+++ src/timeline.c
@@ -2777,10 +2777,14 @@
2777 ){
2778 Blob r, co;
2779 int i, j;
2780 blob_init(&r, 0, 0);
2781 blob_init(&co, 0, 0);
 
 
 
 
2782
2783 /* Replace LF and tab with space, delete CR */
2784 while( zCom[0] ){
2785 for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){}
2786 blob_append(&co, zCom, j);
2787
--- src/timeline.c
+++ src/timeline.c
@@ -2777,10 +2777,14 @@
2777 ){
2778 Blob r, co;
2779 int i, j;
2780 blob_init(&r, 0, 0);
2781 blob_init(&co, 0, 0);
2782
2783 if( 0==zCom ){
2784 zCom = "(NULL)";
2785 }
2786
2787 /* Replace LF and tab with space, delete CR */
2788 while( zCom[0] ){
2789 for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){}
2790 blob_append(&co, zCom, j);
2791

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button