moveconfig: replace unsafe eval with asteval
authorMarkus Klotzbuecher <mk@mkio.de>
Wed, 12 Feb 2020 19:46:44 +0000 (20:46 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 25 Feb 2020 18:46:25 +0000 (13:46 -0500)
commitb3192f48c19c15d37ba69722b2846de4b73b27cd
treea9fda4ba0a893ca84b7aa91415b19fc01bb4d996
parent080cc0b1b33465db68a9863beeb827514093f893
moveconfig: replace unsafe eval with asteval

Commit b237d358b425 ("moveconfig: expand simple expressions") added
support for expanding expressions in configs, but used the unsafe python
built-in "eval". This patch fixes this by replacing eval with the
asteval module.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
tools/moveconfig.py