#748400 gnuplot: Buffer overflow in epslatex terminal

#748400#5
Date:
2014-05-16 21:33:19 UTC
From:
To:
gnuplot -e "set terminal epslatex header sprintf('%.850f',0)"

gives

*** buffer overflow detected ***: gnuplot terminated

But actually I really want to set a header as long as this. Longer then
852 characters.

#748400#10
Date:
2014-05-29 11:42:53 UTC
From:
To:
tags 748400 +upstream
forwarded 748400 http://sourceforge.net/p/gnuplot/bugs/1413
thanks

#748400#19
Date:
2014-05-29 18:24:57 UTC
From:
To:
Hi Ethan,

I can reproduce it:

gnuplot -e "set terminal epslatex header sprintf('%.850f',0)"
*** buffer overflow detected ***: gnuplot terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x6ea2f)[0x7f8ba77baa2f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f8ba7840dd7]
/lib/x86_64-linux-gnu/libc.so.6(+0xf3e50)[0x7f8ba783fe50]
/lib/x86_64-linux-gnu/libc.so.6(+0xf2deb)[0x7f8ba783edeb]
gnuplot(+0xce408)[0x7f8ba9481408]
gnuplot(+0x96818)[0x7f8ba9449818]
gnuplot(+0x2468d)[0x7f8ba93d768d]
gnuplot(+0x24878)[0x7f8ba93d7878]
gnuplot(+0x1899b)[0x7f8ba93cb99b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f8ba776db45]
gnuplot(+0x18e3c)[0x7f8ba93cbe3c]
======= Memory map: ========
...
...

Our compilation-flags are relatively strict [1]:

#748400#24
Date:
2014-05-29 20:24:51 UTC
From:
To:
Suggested work-around:

Put your long header in a separate file.
Change the gnuplot command to

 set term epslatex header "\\include{myheaderfile}\n"

#748400#29
Date:
2015-05-01 17:32:02 UTC
From:
To:
Thanks for submitting this upstream!

On jessie I'm not experiencing this bug anymore (checked with gnuplot 4
and 5). So probably fixed?