Fossil SCM

In "fossil import --svn", also refuse an svndiff0 window whose instructions make fewer bytes than its target length, which left bytes of the imported file that were never written.

dmestas 2026-11-17 13:43 UTC small-fixes-2
Commit 10bdbac2ef0d01feb173a58e825a593e45df0dcf60d4e12f9cbd43dc7df27b99
1 file changed +3
--- src/import.c
+++ src/import.c
@@ -1317,10 +1317,13 @@
13171317
lenLeft -= lenCpy;
13181318
while( lenCpy-- > 0 ){
13191319
*zOut++ = *zCpy++;
13201320
}
13211321
}
1322
+ if( lenLeft!=0 ){
1323
+ fossil_fatal("Invalid svndiff0 format");
1324
+ }
13221325
zDiff = zDataEnd;
13231326
}
13241327
}
13251328
13261329
/*
13271330
--- src/import.c
+++ src/import.c
@@ -1317,10 +1317,13 @@
1317 lenLeft -= lenCpy;
1318 while( lenCpy-- > 0 ){
1319 *zOut++ = *zCpy++;
1320 }
1321 }
 
 
 
1322 zDiff = zDataEnd;
1323 }
1324 }
1325
1326 /*
1327
--- src/import.c
+++ src/import.c
@@ -1317,10 +1317,13 @@
1317 lenLeft -= lenCpy;
1318 while( lenCpy-- > 0 ){
1319 *zOut++ = *zCpy++;
1320 }
1321 }
1322 if( lenLeft!=0 ){
1323 fossil_fatal("Invalid svndiff0 format");
1324 }
1325 zDiff = zDataEnd;
1326 }
1327 }
1328
1329 /*
1330

Keyboard Shortcuts

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