Fossil SCM

Fix a potential segfault in the graph generator when check-ins occur with time skew.

drh 2010-08-21 03:27 trunk
Commit 32c9c47c93ea16a4a806b54f0e2497044ff23ec4
1 file changed +3 -3
+3 -3
--- src/graph.c
+++ src/graph.c
@@ -410,13 +410,13 @@
410410
int iTarget = (pRow->iRail + pDesc->iRail)/2;
411411
pDesc->mergeOut = findFreeRail(p, pRow->idx, pDesc->idx, 0, iTarget);
412412
pDesc->mergeUpto = pRow->idx;
413413
mask = 1<<pDesc->mergeOut;
414414
pDesc->railInUse |= mask;
415
- for(pDesc=pRow->pNext; pDesc && pDesc->rid!=parentRid;
416
- pDesc=pDesc->pNext){
417
- pDesc->railInUse |= mask;
415
+ for(pLoop=pRow->pNext; pLoop && pLoop->rid!=parentRid;
416
+ pLoop=pLoop->pNext){
417
+ pLoop->railInUse |= mask;
418418
}
419419
}
420420
pRow->mergeIn |= 1<<pDesc->mergeOut;
421421
}
422422
}
423423
--- src/graph.c
+++ src/graph.c
@@ -410,13 +410,13 @@
410 int iTarget = (pRow->iRail + pDesc->iRail)/2;
411 pDesc->mergeOut = findFreeRail(p, pRow->idx, pDesc->idx, 0, iTarget);
412 pDesc->mergeUpto = pRow->idx;
413 mask = 1<<pDesc->mergeOut;
414 pDesc->railInUse |= mask;
415 for(pDesc=pRow->pNext; pDesc && pDesc->rid!=parentRid;
416 pDesc=pDesc->pNext){
417 pDesc->railInUse |= mask;
418 }
419 }
420 pRow->mergeIn |= 1<<pDesc->mergeOut;
421 }
422 }
423
--- src/graph.c
+++ src/graph.c
@@ -410,13 +410,13 @@
410 int iTarget = (pRow->iRail + pDesc->iRail)/2;
411 pDesc->mergeOut = findFreeRail(p, pRow->idx, pDesc->idx, 0, iTarget);
412 pDesc->mergeUpto = pRow->idx;
413 mask = 1<<pDesc->mergeOut;
414 pDesc->railInUse |= mask;
415 for(pLoop=pRow->pNext; pLoop && pLoop->rid!=parentRid;
416 pLoop=pLoop->pNext){
417 pLoop->railInUse |= mask;
418 }
419 }
420 pRow->mergeIn |= 1<<pDesc->mergeOut;
421 }
422 }
423

Keyboard Shortcuts

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