All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Jeff King" <peff@peff.net>,
	"Carlos Martín Nieto" <cmn@elego.de>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [RFC/PATCH] ignore memcmp() overreading in bsearch() callback
Date: Tue, 15 Jan 2013 21:27:36 +0100	[thread overview]
Message-ID: <m2libunqdj.fsf@igel.home> (raw)
In-Reply-To: <50F57BDF.1050400@lsrfire.ath.cx> ("René Scharfe"'s message of "Tue, 15 Jan 2013 16:55:11 +0100")

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."

  reply	other threads:[~2013-01-15 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 23:36 [RFC/PATCH] ignore memcmp() overreading in bsearch() callback Junio C Hamano
2013-01-14 23:56 ` Johannes Schindelin
2013-01-15  2:45   ` Junio C Hamano
2013-01-15 15:50 ` Jeff King
2013-01-15 16:55   ` Junio C Hamano
2013-01-15 17:18     ` Jeff King
2013-01-15 15:55 ` René Scharfe
2013-01-15 20:27   ` Andreas Schwab [this message]
2013-01-16  1:08     ` René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2libunqdj.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=cmn@elego.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.