]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: lwip: fix dhcp_loop()
authorJerome Forissier <jerome.forissier@linaro.org>
Fri, 22 Nov 2024 12:35:29 +0000 (13:35 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 22 Nov 2024 20:37:21 +0000 (14:37 -0600)
commit8c95d84b39fc0886a4417c5ddefc2ea05217c0ac
tree205ed2fa761ee940d75a5e5d7cc3afbfd1df669a
parente92b5d0ddfbe95b0d6bf5277f06d00b1acfa0b83
net: lwip: fix dhcp_loop()

The local variables ipstr, maskstr and gwstr in static function
dhcp_loop() cannot be pointers to read-only data, since they may be
written to in case the device index is > 0. Therefore make them char
arrays allocated on the stack.

Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
net/lwip/dhcp.c