On Wed, Aug 26, 2015 at 04:44:04PM -0700, Kees Cook wrote: > On Wed, Aug 26, 2015 at 4:34 PM, Karel Zak <kzak@xxxxxxxxxx> wrote: > > On Wed, Aug 26, 2015 at 03:49:23PM -0700, Kees Cook wrote: > >> @@ -212,6 +212,8 @@ struct libmnt_table { > >> int comms; /* enable/disable comment parsing */ > >> char *comm_intro; /* First comment in file */ > >> char *comm_tail; /* Last comment in file */ > >> + char *buf; /* Memory for reading lines */ > >> + size_t buf_size; /* Size of line-reading buffer */ > > > > It's overkill to add the buffer to the struct, it's necessary > > only in mnt_table_parse_next(). > > It seemed really inefficient to go from a stack buffer to a > malloc-per-call of mnt_table_parse_next(). I'm fine to write it that > way, though. What do you think is best here? I'll try to prepare a patch with new struct libmnt_parser where we can store another parser specific things like current line number, file name, etc. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- 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