|
From: Ethan A M. <sf...@us...> - 2013-02-08 23:17:47
|
On Friday, February 08, 2013 01:16:44 am Tait wrote: > > Someone pointed out the other day, that: > > set format "%B %b" > plot x > > ... triggers either an assertion failure and/or a segfault on 4.6p0 > and 4.6p1. > > I get neither, but the resulting plot is clearly broken; the ticks are > seemingly random combinations of letters and numbers that seem to bear > no relation to the plotted values. Fixed in CVS. Thanks. Over the default range of "plot", "%B" produces no output. This left the output buffer unitialized, causing strlen(buffer) to return a nonsensical value quite possibly longer than the buffer itself. Depending on the contents of the unitialized buffer, you'd either get a null-terminated garbage string or a buffer overrun. The error is not specific to "%B" but that's an easy way to trigger it. This is the second major and very long-standing buffer problem in gprintf() that's turned up recently. Ethan |