From 2a5381ba260be86473a323eb479d42eac0c44750 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 30 Jul 2016 20:10:45 -0300 Subject: Fix buffer overflow in loadgraph while shifting data --- shell/loadgraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/loadgraph.c b/shell/loadgraph.c index 22c44dae..8fbeef48 100644 --- a/shell/loadgraph.c +++ b/shell/loadgraph.c @@ -265,7 +265,7 @@ void load_graph_update(LoadGraph * lg, gint value) return; /* shift-right our data */ - for (i = 0; i < lg->size; i++) { + for (i = 0; i < lg->size - 1; i++) { lg->data[i] = lg->data[i + 1]; } -- cgit v1.2.3