Fossil SCM

In import --git, refuse a committer, author or tagger line without a space after the email address, so that the time is never read past the end of the line.

dmestas 2026-11-20 20:38 UTC small-fixes
Commit c4f2b4c56cba95a1a55747978aa9d70926e8b45ecaf40d24a99281743e2afa29
1 file changed +1
--- src/import.c
+++ src/import.c
@@ -672,10 +672,11 @@
672672
|| strncmp(zLine, "committer ",10)==0 ){
673673
sqlite3_int64 secSince1970;
674674
z = strchr(zLine, ' ');
675675
while( fossil_isspace(*z) ) z++;
676676
if( (zTo=strchr(z, '>'))==NULL ) goto malformed_line;
677
+ if( zTo[1]!=' ' ) goto malformed_line;
677678
*(++zTo) = '\0';
678679
/*
679680
** If --attribute requested, lookup user in fx_ table by email address,
680681
** otherwise lookup Git {author,committer} contact info in user table. If
681682
** no matches, use email address as username for check-in attribution.
682683
--- src/import.c
+++ src/import.c
@@ -672,10 +672,11 @@
672 || strncmp(zLine, "committer ",10)==0 ){
673 sqlite3_int64 secSince1970;
674 z = strchr(zLine, ' ');
675 while( fossil_isspace(*z) ) z++;
676 if( (zTo=strchr(z, '>'))==NULL ) goto malformed_line;
 
677 *(++zTo) = '\0';
678 /*
679 ** If --attribute requested, lookup user in fx_ table by email address,
680 ** otherwise lookup Git {author,committer} contact info in user table. If
681 ** no matches, use email address as username for check-in attribution.
682
--- src/import.c
+++ src/import.c
@@ -672,10 +672,11 @@
672 || strncmp(zLine, "committer ",10)==0 ){
673 sqlite3_int64 secSince1970;
674 z = strchr(zLine, ' ');
675 while( fossil_isspace(*z) ) z++;
676 if( (zTo=strchr(z, '>'))==NULL ) goto malformed_line;
677 if( zTo[1]!=' ' ) goto malformed_line;
678 *(++zTo) = '\0';
679 /*
680 ** If --attribute requested, lookup user in fx_ table by email address,
681 ** otherwise lookup Git {author,committer} contact info in user table. If
682 ** no matches, use email address as username for check-in attribution.
683

Keyboard Shortcuts

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