# Re: \[PATCH v5 1/3\] color.c: fix color\_parse\_mem() with value\_len == 0

- From: Jeff King \<hidden\>
- Date: 2017-01-19 16:39:47 
- List: git
- Page: https://ratatoskr.run/git/2017/01/7704861
- Thread: https://ratatoskr.run/git/2016/12/7702421/t.md

```text
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
```
