Fossil SCM
Fix a potential segfault in the graph generator when check-ins occur with time skew.
Commit
32c9c47c93ea16a4a806b54f0e2497044ff23ec4
Parent
79c9de763a272f3…
1 file changed
+3
-3
+3
-3
| --- src/graph.c | ||
| +++ src/graph.c | ||
| @@ -410,13 +410,13 @@ | ||
| 410 | 410 | int iTarget = (pRow->iRail + pDesc->iRail)/2; |
| 411 | 411 | pDesc->mergeOut = findFreeRail(p, pRow->idx, pDesc->idx, 0, iTarget); |
| 412 | 412 | pDesc->mergeUpto = pRow->idx; |
| 413 | 413 | mask = 1<<pDesc->mergeOut; |
| 414 | 414 | 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; | |
| 418 | 418 | } |
| 419 | 419 | } |
| 420 | 420 | pRow->mergeIn |= 1<<pDesc->mergeOut; |
| 421 | 421 | } |
| 422 | 422 | } |
| 423 | 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(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 |