On Thu, May 03, 2018 at 09:19:01AM -0600, Todd C. Miller wrote:

> On Thu, 03 May 2018 13:58:35 +0300, Vadim Zhukov wrote:
> 
> > Here is patch for libkvm that fixes a few memory handling problems.
> > Most changes are mechanical, with some exceptions:
> >
> >   1. Most notable: this splits argv buffer into argv-specific one
> >      and environ-specific one. This makes ps -eww totally happy.
> >
> >   2. realloc() usage in kvm_argv() is now ENOMEM-prone. This is
> >      actually the same change as in one of the patches I've sent
> >      earlier, since that other patch heavily conflicts with this one.
> >
> >   3. The "int off" changed to "ptrdiff_t off", as it should be.
> >      If I understand things correctly, we're lucky that this didn't
> >      strike us on 64-bit archs yet. The <stddef> is needed only
> >      for the ptrdiff_t.
> 
> Looks good, OK millert@
> 
>  - todd

Yes, looks good from reading. But all te extra checks before calling
free can go. That's idiom from a *long* time ago.

        -Otto

Reply via email to