[PATCH 0/2] bsearch: fix overflow and avoid unnecessary calculation

From: Andrà Goddard Rosa
Date: Tue Nov 10 2009 - 09:28:38 EST


Fix a rare overflow situation which can occur when working with large arrays.
Also, remove an unneeded calculation.

Andrà Goddard Rosa (2):
bsearch: avoid unneeded decrement arithmetic
bsearch: prevent overflow when computing middle comparison element

lib/bsearch.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/