]> git.ozlabs.org Git - ccan/commitdiff
tal: check headers more carefully.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 3 Dec 2012 08:59:38 +0000 (19:29 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 3 Dec 2012 08:59:38 +0000 (19:29 +1030)
We sanity check tal headers by ensuring that the pointers are in the
bounds of things we've allocated.  But the first one we check is the
prop ptr, which may also be a literal: this is_literal() dereferences
the pointer, which means we usually crash here if it's not a tal
object.

Move that last, and we have far more success with our sanity checking.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found