bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add 'safe-alloc' module


From: Bruno Haible
Subject: Re: [PATCH] Add 'safe-alloc' module
Date: Thu, 19 Feb 2009 23:59:00 +0100
User-agent: KMail/1.9.9

Hi David,

Thanks for proposing such a nice module! Uses of malloc/realloc really
need a lot of attention and care, and I've also produced bug #7 (memory
leak if realloc fails) more than once.

For a module as basic as this one, in gnulib, I think it's essential that the
copyright is with the FSF. Can you arrange with Daniel Berrange and/or his
employer (Red Hat) that the copyright gets assigned?

Otherwise, looks well done. I see only a couple of minor points to be
resolved:
  - avoid collision between xalloc.h and safe-alloc.h over xalloc_oversized,
  - use xalloc_oversized also before calling calloc, because most libc
    implementations will not have the overflow check,
  - use GNU conventions (space between identifier and opening parenthesis,
    placement of braces) in safe-alloc.h,
  - perhaps a unit test?

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]