Bruno Haible <[email protected]> writes: > Hi Simon, > > The gc_hash_clone function, as defined in lib/gc-libgcrypt.c, has a strange > API: > If it fails with return code GC_INVALID_HASH, it sets *outhandle to a free()d > memory pointer. > > That could lead to a double-free error if the caller were to free(*outhandle) > when *outhandle has changed. > > The only user of this function that I can see is > gnutls/lib/gnutls_hash_int.c, and it fortunately does not have a bug. > > Nevertheless, what do you think about leaving *outhandle unset upon failure?
I can't think of any code that would have a problem with that change, so +1, would you like to fix it? /Simon
signature.asc
Description: PGP signature
