Fossil SCM

In parse_mark(), refuse a commit or blob mark whose record number is not positive, so that --import-marks no longer accepts a hash the repository lacks by matching record number 0.

dmestas 2026-11-21 11:59 UTC small-fixes
Commit 45df7bfacffcfa62fb083d23584694a82b8ecbb2d87852c951270fe38c9fdafa
1 file changed +3
--- src/export.c
+++ src/export.c
@@ -313,10 +313,13 @@
313313
type_ = cur_tok[0];
314314
if( type_!='c' && type_!='b' ){
315315
/* This is probably a blob mark */
316316
mark->name = NULL;
317317
return 0;
318
+ }
319
+ if( mark->rid<=0 ){
320
+ return -1;
318321
}
319322
320323
cur_tok = strtok(NULL, " \t");
321324
if( !cur_tok ){
322325
/* This mark was generated by an older version of Fossil and doesn't
323326
--- src/export.c
+++ src/export.c
@@ -313,10 +313,13 @@
313 type_ = cur_tok[0];
314 if( type_!='c' && type_!='b' ){
315 /* This is probably a blob mark */
316 mark->name = NULL;
317 return 0;
 
 
 
318 }
319
320 cur_tok = strtok(NULL, " \t");
321 if( !cur_tok ){
322 /* This mark was generated by an older version of Fossil and doesn't
323
--- src/export.c
+++ src/export.c
@@ -313,10 +313,13 @@
313 type_ = cur_tok[0];
314 if( type_!='c' && type_!='b' ){
315 /* This is probably a blob mark */
316 mark->name = NULL;
317 return 0;
318 }
319 if( mark->rid<=0 ){
320 return -1;
321 }
322
323 cur_tok = strtok(NULL, " \t");
324 if( !cur_tok ){
325 /* This mark was generated by an older version of Fossil and doesn't
326

Keyboard Shortcuts

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