1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixed critical buffer overflow

git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@267 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
Steffen Vogel 2015-01-20 10:52:04 +00:00
parent b7fcd2cc43
commit 6cdcdc0239

View file

@ -43,9 +43,9 @@ void hist_put(struct hist *h, double value)
h->lowest = value;
/* Check bounds and increment */
if (value >= h->length)
if (idx >= h->length)
h->higher++;
else if (value < 0)
else if (idx < 0)
h->lower++;
else {
h->total++;