:echo libcall("/lib/libc.so.6", "printf", "hello")
and got a SEGFAULT in
for (p = get_var_string(&retvar); *p != NUL && !got_int; ++p)
I guess this is due to the fact that the result is interpreted
as string (char*) but is an integer (5). How would you catch
a misusage like this ?
- Wichert Akkerman wrote:
> Previously Bram Moolenaar wrote:Yes, but it uses alloc() (a Vim function) instead of malloc(). alloc() has a
> > No, vim_strsave() is just a wrapper around malloc(), used to make a copy
> > of a string.
> So it's basically strdup?
few extra checks for not allocating too much memory (so that enough is left to
write out the file when needed, for example).
hundred-and-one symptoms of being an internet addict:
147. You finally give up smoking...because it made the monitor dirty.
/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/