Skip to content
Snippets Groups Projects
Commit 4ed27ca9 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use safer string things...

We really need strlcpy()/strlcat() wrappers in xpdev.
parent 6c7b30ab
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6241 passed
......@@ -15479,11 +15479,15 @@ do_skypix(char *buf, size_t len)
break;
char *dldir = strdup(rip.bbs->dldir);
strcpy(rip.bbs->dldir, cache_path);
strcat(cache_path, p);
suspend_rip(true);
xmodem_download(rip.bbs, XMODEM | CRC | RECV, cache_path);
suspend_rip(false);
strcpy(rip.bbs->dldir, dldir);
// TODO: Handle error...
if ((strlen(cache_path) + strlen(p) + 1) <= sizeof(cache_path)) {
strcat(cache_path, p);
suspend_rip(true);
xmodem_download(rip.bbs, XMODEM | CRC | RECV, cache_path);
suspend_rip(false);
}
// TODO: strlcpy() needed in xpdev
strncpy(rip.bbs->dldir, dldir, sizeof(rip.bbs->dldir));
free(dldir);
}
break;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment