We clear all heap memory on free now, thus the difference between these functions is quite small. There are some differences though: Firstly, BN_clear_free will attempt to zero out static limb data. But static data is probably read-only and thus trying to zero it will crash. Secondly it will try to zero out the BIGNUM structure itself. But either it's on the heap, and will be zeroed anyway, or else it's on the stack, and we don't try and clear the stack in general because the compiler is duplicating bits of it at will anyway. Change-Id: I8a07385a102cfd308b555432942225c25eb7c12d Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45084 Reviewed-by: David Benjamin <davidben@google.com>chromium-5359
parent
c5e2cf3c07
commit
2d691ca60d
1 changed files with 1 additions and 20 deletions
Loading…
Reference in new issue