Pull request net-20251218.

net-lwip:
- Avoid NULL dereference in _set_cacert()
- Fix filename handling in TFTP
This commit is contained in:
Tom Rini
2025-12-18 10:24:39 -06:00
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -180,6 +180,8 @@ int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
ulong dst_addr;
char nurl[1024];
wget_info = &default_wget_info;
#if CONFIG_IS_ENABLED(WGET_CACERT)
if (argc == 4 && !strncmp(argv[1], "cacert", strlen("cacert")))
return set_cacert(argv[2], argv[3]);
@@ -214,7 +216,6 @@ int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
if (parse_legacy_arg(url, nurl, sizeof(nurl)))
return CMD_RET_FAILURE;
wget_info = &default_wget_info;
if (wget_do_request(dst_addr, nurl))
return CMD_RET_FAILURE;
+3 -2
View File
@@ -279,7 +279,7 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (!arg)
arg = net_boot_file_name;
if (arg) {
if (*arg) {
/* Parse [ip:[port:]]fname */
i = 0;
while ((*(words + i) = strsep(&arg, ":")))
@@ -342,6 +342,7 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0)
ret = CMD_RET_FAILURE;
out:
free(arg);
if (arg != net_boot_file_name)
free(arg);
return ret;
}