mbox series

[0/4] misc fixes from chunked stream rework

Message ID 20240617072905.2275940-1-dominique.martinet@atmark-techno.com
Headers show
Series misc fixes from chunked stream rework | expand

Message

Dominique Martinet June 17, 2024, 7:29 a.m. UTC
These were the patches I sent as RFC patch a couple of weeks ago that
are probably good to take and will be useful regardless of what we end
up doing, it makes sense to split them out:
 - fix a memory leak on set_find_path
 - fix a potential data corruption on partial read before EOF
 - cleanup for callers that could be using copyimage
 - cleanup for steps assignment in __swupdate_copy

(Since I changed the order of the patches you won't be able to apply my
proof of concept chunks, if that is still something you'd want to test
after these patches get merged you can use this branch:
https://github.com/atmark-techno/swupdate/tree/chunked_stream
)

Dominique Martinet (4):
  parser: set_find_path: properly return to-free string array
  cpio_utils: fill_buffer: fix return value on EOF after short read
  copyfile cleanup: use copyimage when we can
  cpio_utils: cleanup state chaining code

 core/cpio_utils.c                   | 35 ++++++++++----------------
 core/parsing_library.c              |  5 ++--
 corelib/lua_interface.c             | 38 ++++++-----------------------
 corelib/parsing_library_libconfig.c |  2 +-
 corelib/parsing_library_libjson.c   |  2 +-
 handlers/delta_handler.c            | 13 +---------
 handlers/rdiff_handler.c            | 13 +---------
 include/parselib.h                  |  2 +-
 parser/parser.c                     |  2 +-
 9 files changed, 29 insertions(+), 83 deletions(-)