| 307 | } |
| 308 | |
| 309 | static u8 *create_fuzz_msg(const tal_t *ctx) |
| 310 | { |
| 311 | u8 *msg = tal_arr(ctx, u8, 0); |
| 312 | u8 msg_len = fromwire_u16(cursor, max); |
| 313 | if (msg_len > *max) |
| 314 | msg_len = *max; |
| 315 | towire_u8_array(&msg, *cursor, msg_len); |
| 316 | return msg; |
| 317 | } |
| 318 | |
| 319 | static struct state *fromwire_new_state(const tal_t *ctx) |
| 320 | { |