From 98a4d6de37cfad2e150ee95f22eb79e1b4cd740a Mon Sep 17 00:00:00 2001 From: Lubos Stanek Date: Sat, 4 Nov 2006 13:14:11 +0100 Subject: [PATCH] ntpd plugin: Fix buffer reallocation when the message is send in more than one packet. --- src/ntpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ntpd.c b/src/ntpd.c index d65d1ed9..52042709 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -694,6 +694,7 @@ static int ntpd_receive_response (int req_code, int *res_items, int *res_size, (items_num + pkt_item_num) * res_item_size); items = realloc ((void *) *res_data, (items_num + pkt_item_num) * res_item_size); + items_num += pkt_item_num; if (items == NULL) { items = *res_data; -- 2.30.2