On Wed, Aug 26, 2015 at 3:38 PM, Mike Frysinger <vapier@xxxxxxxxxx> wrote: > On 26 Aug 2015 15:02, Kees Cook wrote: >> + * Read a line with fgets. If it doesn't fit in the existing buffer, >> + * allocate more heap memory for storage until it does fit. > > why not just use getline then ? It's not often I get to discover new functions in libc. How did I ever miss this? If it behaves the same as fgets on EOF, it'll be perfect. >> + if (fgets (current, remaining, f) == NULL) { > > style omits space before the (. comes up a few times in this patch. Noted. I saw the use of strchr and didn't look much more. :) -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html