Fossil SCM
In import --svn, refuse a node record that has no Node-action header, which was passed to strncmp() as a null pointer.
Commit
46b7b3b92c9c1ebb533f8e13e9da3501f8b755048758e0cc2571157b985cc395
Parent
f4f1c07153778c6…
1 file changed
+3
+3
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1528,10 +1528,13 @@ | ||
| 1528 | 1528 | char *zKind = svn_find_header(rec, "Node-kind"); |
| 1529 | 1529 | char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0; |
| 1530 | 1530 | int deltaFlag = 0; |
| 1531 | 1531 | int srcRev = 0; |
| 1532 | 1532 | |
| 1533 | + if( zAction==0 ){ | |
| 1534 | + fossil_fatal("svn-dump data format broken"); | |
| 1535 | + } | |
| 1533 | 1536 | if ( zPerm==0 ){ |
| 1534 | 1537 | zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0; |
| 1535 | 1538 | } |
| 1536 | 1539 | if( branchId==0 ){ |
| 1537 | 1540 | svn_free_rec(&rec); |
| 1538 | 1541 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1528,10 +1528,13 @@ | |
| 1528 | char *zKind = svn_find_header(rec, "Node-kind"); |
| 1529 | char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0; |
| 1530 | int deltaFlag = 0; |
| 1531 | int srcRev = 0; |
| 1532 | |
| 1533 | if ( zPerm==0 ){ |
| 1534 | zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0; |
| 1535 | } |
| 1536 | if( branchId==0 ){ |
| 1537 | svn_free_rec(&rec); |
| 1538 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1528,10 +1528,13 @@ | |
| 1528 | char *zKind = svn_find_header(rec, "Node-kind"); |
| 1529 | char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0; |
| 1530 | int deltaFlag = 0; |
| 1531 | int srcRev = 0; |
| 1532 | |
| 1533 | if( zAction==0 ){ |
| 1534 | fossil_fatal("svn-dump data format broken"); |
| 1535 | } |
| 1536 | if ( zPerm==0 ){ |
| 1537 | zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0; |
| 1538 | } |
| 1539 | if( branchId==0 ){ |
| 1540 | svn_free_rec(&rec); |
| 1541 |