public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] bsearch: fix overflow and avoid unnecessary calculation
@ 2009-11-09 14:53 André Goddard Rosa
  2009-11-09 14:53 ` [PATCH v2 1/2] bsearch: avoid unneeded decrement arithmetic André Goddard Rosa
  2009-11-09 14:53 ` [PATCH v2 2/2] bsearch: prevent overflow when computing middle comparison element André Goddard Rosa
  0 siblings, 2 replies; 5+ messages in thread
From: André Goddard Rosa @ 2009-11-09 14:53 UTC (permalink / raw)
  To: tabbott, alan-jenkins, rusty, linux-kernel; +Cc: André Goddard Rosa

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(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-11 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 14:53 [PATCH v2 0/2] bsearch: fix overflow and avoid unnecessary calculation André Goddard Rosa
2009-11-09 14:53 ` [PATCH v2 1/2] bsearch: avoid unneeded decrement arithmetic André Goddard Rosa
2009-11-09 14:53 ` [PATCH v2 2/2] bsearch: prevent overflow when computing middle comparison element André Goddard Rosa
2009-11-11  0:18   ` [PATCH v3 " Rusty Russell
2009-11-11 15:00     ` André Goddard Rosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox