Skip to content

Commit

Permalink
Increase bytes allocated for entropy_context
Browse files Browse the repository at this point in the history
  • Loading branch information
malmaud committed Sep 14, 2015
1 parent a4bcb68 commit 66d9607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/entropy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type Entropy

function Entropy()
ctx = new()
ctx.data = Libc.malloc(2000) # 1024
ctx.data = Libc.malloc(100000) # Exact byte count is 75088; playing it safe with some buffer
ccall((:mbedtls_entropy_init, MBED_CRYPTO), Void, (Ptr{Void},), ctx.data)
finalizer(ctx, ctx->begin
ccall((:mbedtls_entropy_free, MBED_CRYPTO), Void, (Ptr{Void},), ctx.data)
Expand Down

0 comments on commit 66d9607

Please sign in to comment.