mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
apps/smtp: Ensure smtp_server is NULL terminated
Ensure we set correct setting when changing smtp_server setting. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
d5cdb91611
commit
4af438916a
@ -353,9 +353,8 @@ smtp_set_server_addr(const char* server)
|
||||
}
|
||||
if (len != 0) {
|
||||
MEMCPY(smtp_server, server, len);
|
||||
} else {
|
||||
smtp_server[0] = 0;
|
||||
}
|
||||
smtp_server[len] = 0;
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user