diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-01 14:15:39 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-12-01 10:33:38 -0500 |
commit | 56331b2680d9fef7e60a88fa50d3e167f236c4a0 (patch) | |
tree | da95bc331ed888120f361fc199d512a9b0e86156 /test/cmd | |
parent | e713124e352efe3141af6a4ffc83f6dba449a177 (diff) | |
download | u-boot-56331b2680d9fef7e60a88fa50d3e167f236c4a0.tar.gz u-boot-56331b2680d9fef7e60a88fa50d3e167f236c4a0.tar.bz2 u-boot-56331b2680d9fef7e60a88fa50d3e167f236c4a0.zip |
setexpr: Split the core logic into its own function
At present this function always allocates a large amount of stack, and
selects its own size for buffers. This makes it hard to test the code
for buffer overflow.
Separate out the inner logic of the substitution so that tests can call
this directly. This will allow checking that the algorithm does not
overflow the buffer.
Fix up one of the error lines at the same time, since it should be
printing nbuf_size, not data_size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd')
0 files changed, 0 insertions, 0 deletions