Re: [hackers] [st] Add xmalloc and xrealloc wrappers || "Roberto E. Vargas Caballero"

From: 123 <p37sitdu_AT_lavabit.com>
Date: Thu, 13 Sep 2012 22:43:58 +0400

On Thu, Sep 13, 2012 at 06:57:15PM +0400, 123 wrote:
> On Thu, Sep 13, 2012 at 04:37:51PM +0200, Joerg Zinke wrote:
> Check for zero size is not required in st. Check for NULL pointer
> is not requried at all, realloc with NULL ptr is equivalent to
> malloc. Only "SIZE_T_MAX / nmemb < size" check may be copied from OpenSSH.

And this check can't be copied, cause there is no nmemb in xrealloc.

So current xrealloc should not be changed, it is ok.
Received on Thu Sep 13 2012 - 20:43:58 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 20:48:05 CEST