mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 06:15:07 -05:00
cmdmon: fix initialization of allocated reply slots
The next pointer in the last allocated reply slot was not set. This could cause a crash when more slots were needed. (the slots are used to save unacknowledged replies to authenticated commands)
This commit is contained in:
1
cmdmon.c
1
cmdmon.c
@@ -566,6 +566,7 @@ get_more_replies(void)
|
|||||||
for (i=1; i<REPLY_EXTEND_QUANTUM; i++) {
|
for (i=1; i<REPLY_EXTEND_QUANTUM; i++) {
|
||||||
new_replies[i-1].next = new_replies + i;
|
new_replies[i-1].next = new_replies + i;
|
||||||
}
|
}
|
||||||
|
new_replies[REPLY_EXTEND_QUANTUM - 1].next = NULL;
|
||||||
free_replies = new_replies;
|
free_replies = new_replies;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user