Attention is currently required from: Felix Singer, Nico Huber, Thomas Heijligen, Angel Pons, Anastasia Klimchuk.
Hello Felix Singer, build bot (Jenkins), Thomas Heijligen, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Peter Marheine,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/67094
to look at the new patch set (#4).
Change subject: programmer_init: Work on a mutable copy of programmer params ......................................................................
programmer_init: Work on a mutable copy of programmer params
The signature of extract_param() was wrong all the time. It actually modifies the passed, global `programmer_param` string. This only com- piled w/o warnings because of a deficiency of the strstr() API. It takes a const string as argument but returns a mutable pointer to a substring of it.
As we take a const parameter string in the libflashrom API and should not change that, we create a copy in programmer_init() instead.
Now that we free our copy of the programmer parameters at the end of programmer_init() it's more obvious that the string can only be used during initialization. So also clear `programmer_param` inside programmer_init() instead of programmer_shutdown().
Change-Id: If6bb2e5e4312b07f756615984bd3757e92b86b0a Signed-off-by: Nico Huber nico.h@gmx.de --- M flashrom.c 1 file changed, 38 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/67094/4