mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
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>
This commit is contained in:
parent
e92b5d0ddf
commit
8c95d84b39
1 changed files with 3 additions and 3 deletions
|
@ -27,9 +27,9 @@ static void call_lwip_dhcp_fine_tmr(void *ctx)
|
|||
|
||||
static int dhcp_loop(struct udevice *udev)
|
||||
{
|
||||
char *ipstr = "ipaddr\0\0";
|
||||
char *maskstr = "netmask\0\0";
|
||||
char *gwstr = "gatewayip\0\0";
|
||||
char ipstr[] = "ipaddr\0\0";
|
||||
char maskstr[] = "netmask\0\0";
|
||||
char gwstr[] = "gatewayip\0\0";
|
||||
unsigned long start;
|
||||
struct netif *netif;
|
||||
struct dhcp *dhcp;
|
||||
|
|
Loading…
Add table
Reference in a new issue