/* Licensed under LGPL - see LICENSE file for details */
#include <ccan/tal/talloc/talloc.h>
-#include <ccan/take/take.h>
#include <errno.h>
#include <assert.h>
*ctxp = newp;
return true;
}
+
+ /* count is unsigned, not size_t, so check for overflow here! */
+ if ((unsigned)count != count) {
+ call_error("Resize overflos");
+ return false;
+ }
+
newp = _talloc_realloc_array(NULL, *ctxp, size, count, NULL);
if (!newp) {
call_error("Resize failure");