This fixes multiple bugs, some might be security relevant. Link: https://github.com/openwrt/openwrt/pull/24258 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit b9ad54db42ddf79335f5224a5ad612cb8389028a)