mbox series

[0/9] uci: fixes for uci_set and uci_add_list

Message ID 20220816112358.75801-1-jan@venekamp.net
Headers show
Series uci: fixes for uci_set and uci_add_list | expand

Message

Jan Venekamp Aug. 16, 2022, 11:23 a.m. UTC
When developing a C application that updates options with uci_set I
noticed that config files were not getting these updates. I found
that this was due to a use-after-free bug in uci_set.

Looking further at the code I also noticed some other issues. This
patch series contains fixes to these issues as well as some other
improvements.

Jan Venekamp (9):
  uci: fix use-after-free uci_set on update option
  uci: maintain option position in uci_set
  uci: optimize update option in uci_set
  uci: fix use-after-free uci_add_list
  uci: fix atomicity of uci_add_list
  uci: maintain option position in uci_add_list
  uci: fix memory leak uci_set on update section
  uci: optimize update section in uci_set
  uci: macro uci_alloc_element not in uci.h

 list.c                                | 168 ++++++++++++--------------
 tests/shunit2/tests.d/090_cli_options |   8 +-
 uci.h                                 |  10 --
 uci_internal.h                        |   3 +
 4 files changed, 87 insertions(+), 102 deletions(-)