Re: [PATCH v5 1/3] color.c: fix color_parse_mem() with value_len == 0
- From
Jeff King <peff@peff.net>
- Date
- Jan 19, 2017, 16:38 UTC
- Message-ID
- <20170119163841.zhtpz6rxdieaywuy@sigill.intra.peff.net>
- In-Reply-To
- <20170119114123.23784-2-pclouds@gmail.com>
On Thu, Jan 19, 2017 at 06:41:21PM +0700, Nguyễn Thái Ngọc Duy wrote:
> In this code we want to match the word "reset". If len is zero, > strncasecmp() will return zero and we incorrectly assume it's "reset" as > a result.
This is probably a good idea. This _is_ user-visible, so it's possible somebody was using empty config as a synonym for "reset". But since it was never documented, I feel like relying on that is somewhat crazy.
-Peff