uci: manually clear uci_ptr flags after uci_delete() operations
authorJo-Philipp Wich <jo@mein.io>
Wed, 23 Dec 2020 18:06:12 +0000 (19:06 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 17 Jan 2021 20:14:46 +0000 (21:14 +0100)
commitd3f2041f4363e76fda57dd6b581eb71cf1a0e114
treebe2bf8b4cda53d2baebe7eae1eebee1ec108aabb
parentea7f4717f8b210a8fa491d288ff99ef74409dbff
uci: manually clear uci_ptr flags after uci_delete() operations

This is required to avoid potential use-after-free errors through the
uci_set()->uci_delete()->uci_expand_ptr() call chain when passing
zero-length strings as values.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3528
Suggested-by: olegio170 <olegios170@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
uci.c