[package] uci: use a delete-safe iterator in the Lua :foreach() function
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 1 Nov 2010 00:20:00 +0000 (00:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 1 Nov 2010 00:20:00 +0000 (00:20 +0000)
commit67bbe149b56f204bd2abb5d217c130ea19d59645
treec187c0f7157eac2eb4fa0d68e7937bd083f9d2f4
parent29da0d1c2a212e0746cdcba8bc14599094e67f39
[package] uci: use a delete-safe iterator in the Lua :foreach() function
The following test case exposed a NULL pointer dereference in uci_lua_foreach():
  lua -luci -e 'x=uci.cursor(); x:foreach("firewall", "forwarding", function(s) x:delete("firewall", s[".name"]) end)'

SVN-Revision: 23757
package/uci/Makefile
package/uci/patches/130-lua_fix_nested_foreach_delete.patch [new file with mode: 0644]