diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-02 15:13:29 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-02 15:13:29 +0000 |
commit | 5544f503bf0fcfd050b4e338e8ec7b22e2f53b9a (patch) | |
tree | 2d65f1fd285c450cbb1c676697ad13b5a47a835c /src/htsftp.c | |
parent | b3fa8537c411e6e2d53044b1d5d20c361d2ad17d (diff) |
Big cleanup in functions writing to a char buffer without proper size boundary.
Diffstat (limited to 'src/htsftp.c')
-rw-r--r-- | src/htsftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/htsftp.c b/src/htsftp.c index a9605d3..5ea7f82 100644 --- a/src/htsftp.c +++ b/src/htsftp.c @@ -217,7 +217,7 @@ int run_launch_ftp(FTPDownloadStruct * pStruct) { ftp_filename = a; if (strnotempty(a)) { char catbuff[CATBUFF_SIZE]; - char *ua = unescape_http(catbuff, a); + char *ua = unescape_http(catbuff, sizeof(catbuff), a); int len_a = (int) strlen(ua); if (len_a > 0 && ua[len_a - 1] == '/') { /* obviously a directory listing */ @@ -528,7 +528,7 @@ int run_launch_ftp(FTPDownloadStruct * pStruct) { if (back->r.statuscode != -1) { if (!transfer_list) { char catbuff[CATBUFF_SIZE]; - char *ua = unescape_http(catbuff, ftp_filename); + char *ua = unescape_http(catbuff, sizeof(catbuff), ftp_filename); if ((strchr(ua, ' ')) || (strchr(ua, '\"')) |