| 9 | } |
| 10 | |
| 11 | void run(const uint8_t *data, size_t size) |
| 12 | { |
| 13 | uint8_t *wire_buff, buff[BIGSIZE_MAX_LEN]; |
| 14 | const uint8_t **wire_chunks, *wire_ptr; |
| 15 | size_t wire_max; |
| 16 | |
| 17 | wire_chunks = get_chunks(NULL, data, size, 8); |
| 18 | for (size_t i = 0; i < tal_count(wire_chunks); i++) { |
| 19 | wire_max = tal_count(wire_chunks[i]); |
| 20 | wire_ptr = wire_chunks[i]; |
| 21 | |
| 22 | bigsize_t bs = fromwire_bigsize(&wire_ptr, &wire_max); |
| 23 | if (bs != 0) { |
| 24 | /* We have a valid bigsize type, now we should not error. */ |
| 25 | assert(bigsize_put(buff, bs) > 0); |
| 26 | assert(bigsize_len(bs)); |
| 27 | |
| 28 | wire_buff = tal_arr(NULL, uint8_t, 8); |
| 29 | towire_bigsize(&wire_buff, bs); |
| 30 | tal_free(wire_buff); |
| 31 | } |
| 32 | } |
| 33 | tal_free(wire_chunks); |
| 34 | } |
nothing calls this directly
no test coverage detected