Re: [PATCH] mailinfo: use strcmp() for string comparison

2014-06-02 Thread Jeff King
On Sun, Jun 01, 2014 at 11:00:40AM +0200, René Scharfe wrote: The array header is defined as: static const char *header[MAX_HDR_PARSED] = { From,Subject,Date, }; When looking for the index of a specfic string in that array, simply use strcmp() instead of memcmp().

[PATCH] mailinfo: use strcmp() for string comparison

2014-06-01 Thread René Scharfe
The array header is defined as: static const char *header[MAX_HDR_PARSED] = { From,Subject,Date, }; When looking for the index of a specfic string in that array, simply use strcmp() instead of memcmp(). This avoids running over the end of the string (e.g. with