| 89 | } |
| 90 | |
| 91 | static u8 *next_script(const tal_t *ctx, const u8 **cursor, size_t *max) |
| 92 | { |
| 93 | const u8 *p; |
| 94 | size_t size; |
| 95 | u8 *ret; |
| 96 | |
| 97 | if (!next_size(cursor, max, &size)) |
| 98 | return NULL; |
| 99 | |
| 100 | if (*max < size) { |
| 101 | *max = 0; |
| 102 | return NULL; |
| 103 | } |
| 104 | |
| 105 | p = *cursor; |
| 106 | *max -= size; |
| 107 | *cursor += size; |
| 108 | |
| 109 | ret = tal_arr(ctx, u8, size); |
| 110 | memcpy(ret, p, size); |
| 111 | return ret; |
| 112 | } |
| 113 | |
| 114 | static void |
| 115 | psbt_input_set_final_witness_stack(const tal_t *ctx, |
no test coverage detected