Re: [RFC/PATCH] ignore memcmp() overreading in bsearch() callback
- From
Andreas Schwab <schwab@linux-m68k.org>
- Date
- Jan 15, 2013, 20:27 UTC
- Message-ID
- <m2libunqdj.fsf@igel.home>
- In-Reply-To
- <50F57BDF.1050400@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> + return '\0' - ent->name[key->len];
You need to cast to unsigned char first to make it consistent with memcmp and strcmp.
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."