If you look at the diff that went in already, it's using mallocarray.
It wouldn't even compile otherwise.
Sorry to break the threading, but I already expunged the original
message..
Re: http://marc.info/?l=openbsd-tech&m=140529530814733&w=2
The second and third hunk should use mallocarray() instead of malloc()
in my eyes.
sizeof(Elf_Phdr) as type just doesnt make sense to me.
Hope not "everyone"
> On Sun, Jul 13, 2014 at 17:52, Theo de Raadt wrote:
> >> And some others from exec that follow a slightly different pattern.
> >
> > This is the pattern I have been following as well.
> >
> > As for the final diff, I've been giving up on the "known constant"
> > scenario. It seems expensive.
>
On Sun, Jul 13, 2014 at 17:52, Theo de Raadt wrote:
>> And some others from exec that follow a slightly different pattern.
>
> This is the pattern I have been following as well.
>
> As for the final diff, I've been giving up on the "known constant"
> scenario. It seems expensive.
Meh. :) I thin
> And some others from exec that follow a slightly different pattern.
This is the pattern I have been following as well.
As for the final diff, I've been giving up on the "known constant"
scenario. It seems expensive.
> Index: exec_script.c
>
On Sun, Jul 13, 2014 at 11:14, Ted Unangst wrote:
> sprinkle malloc array in the kern directory.
And some others from exec that follow a slightly different pattern.
Index: exec_elf.c
===
RCS file: /cvs/src/sys/kern/exec_elf.c,v
retri
sprinkle malloc array in the kern directory.
Index: exec_subr.c
===
RCS file: /cvs/src/sys/kern/exec_subr.c,v
retrieving revision 1.36
diff -u -p -r1.36 exec_subr.c
--- exec_subr.c 12 Jul 2014 18:43:32 - 1.36
+++ exec_subr.c