wryun / es-shell

es: a shell with higher-order functions
http://wryun.github.io/es-shell/
Other
307 stars 25 forks source link

Fix use after free in heredoc variables #19

Closed mwgamera closed 6 years ago

mwgamera commented 6 years ago

After glibc upgrade (I think) one of my scripts started to complain about null variable in here document. The following may or may not reproduce the problem for you, but sealcountedbuffer(buf) frees its argument so using buf->len afterwards is illegal.

; cat a
{} << X
$a
X
; es a
a:3: null variable name in here document
wryun commented 6 years ago

Thanks, missed this.