Fossil SCM

Increase the size of the aPriority[] array in graph.c by one to ensure it never overflows. [forum:/info/2026-07-31T06:40:58Z|Forum 2026-07-31T06:40:58Z]

drh 2026-07-31 11:15 UTC trunk
Commit a8bf88f8ffab98dd404bc95867fc8f46ff0c564f4bd5cf9c401729f6007f02ab
1 file changed +1 -1
+1 -1
--- src/graph.c
+++ src/graph.c
@@ -1011,11 +1011,11 @@
10111011
** is defined. This improves the display of r=BRANCH
10121012
** options to /timeline.
10131013
**
10141014
** 0x01 A rail that merges with the preferred branch
10151015
*/
1016
- u16 aPriority[GR_MAX_RAIL];
1016
+ u16 aPriority[GR_MAX_RAIL+1];
10171017
int mxMatch = 0;
10181018
memset(aPriority, 0, (p->mxRail+1)*sizeof(aPriority[0]));
10191019
if( pLeftBranch ){
10201020
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
10211021
int iMatch = match_text(pLeftBranch, pRow->zBranch);
10221022
--- src/graph.c
+++ src/graph.c
@@ -1011,11 +1011,11 @@
1011 ** is defined. This improves the display of r=BRANCH
1012 ** options to /timeline.
1013 **
1014 ** 0x01 A rail that merges with the preferred branch
1015 */
1016 u16 aPriority[GR_MAX_RAIL];
1017 int mxMatch = 0;
1018 memset(aPriority, 0, (p->mxRail+1)*sizeof(aPriority[0]));
1019 if( pLeftBranch ){
1020 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
1021 int iMatch = match_text(pLeftBranch, pRow->zBranch);
1022
--- src/graph.c
+++ src/graph.c
@@ -1011,11 +1011,11 @@
1011 ** is defined. This improves the display of r=BRANCH
1012 ** options to /timeline.
1013 **
1014 ** 0x01 A rail that merges with the preferred branch
1015 */
1016 u16 aPriority[GR_MAX_RAIL+1];
1017 int mxMatch = 0;
1018 memset(aPriority, 0, (p->mxRail+1)*sizeof(aPriority[0]));
1019 if( pLeftBranch ){
1020 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
1021 int iMatch = match_text(pLeftBranch, pRow->zBranch);
1022

Keyboard Shortcuts

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