Mailing List Archive

grcypt.h should use __alloc_size__ attribute.


#define _GCRY_GCC_ATTR_ALLOC_SIZE(params) __attribute__
((__alloc_size__ params))

void *gcry_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC

and so on.

Gcrypt-devel mailing list
Re: grcypt.h should use __alloc_size__ attribute. [ In reply to ]
On Fri, 6 Apr 2012 17:34, said:

> void *gcry_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC

I am not sure whether this is a good idea. The actually allocated
object may be larger than something allocated by malloc.



Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.

Gcrypt-devel mailing list