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.
Commit
c4f2b4c56cba95a1a55747978aa9d70926e8b45ecaf40d24a99281743e2afa29
Parent
8f034a224589616…
1 file changed
+1
+1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -672,10 +672,11 @@ | ||
| 672 | 672 | || strncmp(zLine, "committer ",10)==0 ){ |
| 673 | 673 | sqlite3_int64 secSince1970; |
| 674 | 674 | z = strchr(zLine, ' '); |
| 675 | 675 | while( fossil_isspace(*z) ) z++; |
| 676 | 676 | if( (zTo=strchr(z, '>'))==NULL ) goto malformed_line; |
| 677 | + if( zTo[1]!=' ' ) goto malformed_line; | |
| 677 | 678 | *(++zTo) = '\0'; |
| 678 | 679 | /* |
| 679 | 680 | ** If --attribute requested, lookup user in fx_ table by email address, |
| 680 | 681 | ** otherwise lookup Git {author,committer} contact info in user table. If |
| 681 | 682 | ** no matches, use email address as username for check-in attribution. |
| 682 | 683 |
| --- 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 |