Jeremie Koenig, le Fri 13 Aug 2010 19:05:12 +0200, a écrit : > On Linux, /proc/NNNN/cmdline is a NUL-separated list of arguments. > We used to truncate after the first one and add some whitespace.
You can now drop the cmdline_data variable.
> + {
> + memcpy (data, ps->args, ps->args_len);
> + *len = ps->args_len;
> + }
Mmm, isn't there a potential `data' buffer overflow? I guess *len
contains the size of the `data' buffer and should be taken into account?
Samuel
