| 281 | } |
| 282 | |
| 283 | int file_buffer_resize(FileBuffer *bs, size_t new_size) |
| 284 | { |
| 285 | uint8_t *new_data; |
| 286 | new_data = realloc(bs->data, new_size); |
| 287 | if (!new_data && new_size != 0) |
| 288 | return -1; |
| 289 | bs->data = new_data; |
| 290 | bs->allocated_size = new_size; |
| 291 | return 0; |
| 292 | } |
| 293 | |
| 294 | void file_buffer_write(FileBuffer *bs, size_t offset, const uint8_t *buf, |
| 295 | size_t size) |
no outgoing calls
no test coverage detected