secmem fix
AbandonedPublic

Authored by gniibe on Jun 1 2017, 2:13 PM.

Details

Reviewers
werner
Summary

secmem implementation has two bugs:
(1) Under some heavy use, it gets SEGV.
(2) Calculation of allocated memory is wrong.

I think this patch fixes these two problems.

Test Plan

Diff Detail

Repository
rC libgcrypt
Lint
Lint Skipped
Unit
Unit Tests Skipped
gniibe created this revision.Jun 1 2017, 2:13 PM
gniibe added a comment.Jun 2 2017, 3:31 AM

Here is a test case:


It doesn't dump core on my x86 GNU/Linux, but we can see invalid stats.
Running under valgrind, it dumps core.

gniibe abandoned this revision.Jun 8 2017, 6:39 AM