tal/talloc: fix overflow on 64 bit systems
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 10 Jun 2014 05:09:34 +0000 (14:39 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 10 Jun 2014 05:09:34 +0000 (14:39 +0930)
commit36c52c260ed076d36a308dc4ea755f965abf0629
tree369d7bc8b6907c22db125b4c7e70be7926936b63
parent7207c7822bbe0deef98aa71a5b2e721be370b446
tal/talloc: fix overflow on 64 bit systems

Arguably a bug in talloc_realloc_array, which uses an unsigned for
size, resulting in silent truncation and a memcpy into a too-small
buffer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/talloc/talloc.c