[PATCH uci] uci: decrease the n_section when section is freed
leon at georgemail.eu
Sun Sep 3 13:16:52 PDT 2023
No idea whether this fix is entirely correct but I also encountered the issue
and the patch fixes them.
When a large enough number of sections is deleted, it is also possible to go out
of bounds leading to segmentation faults.
On Tue, 29 Aug 2023 19:58:46 +0800
Jeff Shiu <waherob42858 at gmail.com> wrote:
> The package n_section counter increases when a section is allocated
> but does not decrease when a section is freed.
> Since the anonymous section name is comprised of the section counter,
> if the package is not reloaded, an incorrect count will result in
> operating on the wrong section.
More information about the openwrt-devel