This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use calloc (x, y) instead malloc (x * y).


On Fri, Oct 25, 2013 at 10:40:08AM +0200, OndÅej BÃlka wrote:
> Hi,
> 
> As there were several bugs with possible overflows in malloc calculation
> we should try to prevent these. A simple heuristic is to use following
> cocinelle patch:
> 
> @@ expression e1, e2; @@
> 
> - malloc(e1 * e2)
> + calloc(e1, e2)
> 
> To handle easy case. OK to commit?
> 
> ./ChangeLog:
> 

Please write correct ChangeLog entries, with entries for all functions
you touch and not just for the files.  If you think it is a waste of
time, I'll agree with you, but since we don't have consensus on
getting rid of it yet, this needs to be followed.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]