lkml.org 
[lkml]   [2009]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] bsearch: fix overflow and avoid unnecessary calculation
Date
Fix a rare overflow situation which can occur when working with large arrays.
Also, remove an unneeded calculation.

changelog:
v2: fix a bug introduced into 00/01 of the v1 patch
v1: initial submission

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

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

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

\
 
 \ /
  Last update: 2009-11-10 15:59    [W:0.441 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site