Richard Guenther wrote: > On Thu, Apr 19, 2012 at 10:35 PM, Jim Meyering <j...@meyering.net> wrote: >> Richard Guenther wrote: >>> Sure, my point was that the >>> >>> if (strlen (m->name) >= sizeof buf) >>> { >>> error ("%s:%d:mode name \"%s\" is too long", >>> m->file, m->line, m->name); >>> continue; >>> } >>> >>> check does not account for the (conditional) prepending of 'C' and the >>> snprintf would silently discard the last character of the name. >> >> Here's a patch for that. (passes make bootstrap) >> Incidentally it removes the name-length limitation of 7 and it hoists >> the xmalloc, which induces the single added free-before-continue. >> There was some clean-up along the way: "q" was easy to eliminate, and >> I pulled the two identical snprintf calls out of the "if" block and >> replaced them with the buf[0] assignment and memcpy. > > Ok.
Thanks for the review. Committed.