Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.20.1601101430330.24458@monopod.intra.ispras.ru>
Date: Sun, 10 Jan 2016 14:38:05 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
Subject: Re: Possible infinite loop in qsort()

On Sat, 9 Jan 2016, Rich Felker wrote:
> Note also that if you do want to use this code on an implementation
> without such a guarantee, only the case where the member size is 1 can
> possibly have >SIZE_MAX/2 members.

I don't think so: the problematic loop in musl computes Leonardo numbers
premultiplied by member size, to be used as byte offsets in the array to be
sorted.  So individual member size doesn't matter, only the overall array
size.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.