Page MenuHome GnuPG

not all malloc performed in libgcrypt covered by gcry_set_allocation_handler
Closed, ResolvedPublic

Description

libgcrypt allows to provide our own malloc implementation. Howver I have identified at least three direct call of malloc instead of do_malloc (global.c)
hmac256.c -> _gcry_hmac256_file
hmac256.c -> _gcry_hmac256_new

secmem.c -> init_pool

Details

Version
1.8.2

Revisions and Commits

Event Timeline

werner triaged this task as Normal priority.Apr 5 2018, 2:48 PM
werner added a subscriber: werner.

For secmem.c this is on purpose. For the others we should fix that.

Note:
When we change the allocation, hmac256.c will not be standalone any more (as commented in the head of the file), and we will need to change the compile-command line to include libgpg-error.

Or... do we keep allocation by malloc with STANDALONE-ifdef?

gniibe changed the task status from Open to Testing.Apr 11 2018, 1:52 AM