mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-03 13:24:05 +00:00
Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master: ftp: fix using uninitialized value Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
372e00793f
@ -265,7 +265,7 @@ static int ftp_auth(FTPContext *s)
|
|||||||
|
|
||||||
static int ftp_passive_mode(FTPContext *s)
|
static int ftp_passive_mode(FTPContext *s)
|
||||||
{
|
{
|
||||||
char *res = NULL, *start, *end;
|
char *res = NULL, *start = NULL, *end = NULL;
|
||||||
int i;
|
int i;
|
||||||
const char *command = "PASV\r\n";
|
const char *command = "PASV\r\n";
|
||||||
const int pasv_codes[] = {227, 501, 0}; /* 501 is incorrect code */
|
const int pasv_codes[] = {227, 501, 0}; /* 501 is incorrect code */
|
||||||
@ -273,8 +273,7 @@ static int ftp_passive_mode(FTPContext *s)
|
|||||||
if (ftp_send_command(s, command, pasv_codes, &res) != 227 || !res)
|
if (ftp_send_command(s, command, pasv_codes, &res) != 227 || !res)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
start = NULL;
|
for (i = 0; res[i]; ++i) {
|
||||||
for (i = 0; i < strlen(res); ++i) {
|
|
||||||
if (res[i] == '(') {
|
if (res[i] == '(') {
|
||||||
start = res + i + 1;
|
start = res + i + 1;
|
||||||
} else if (res[i] == ')') {
|
} else if (res[i] == ')') {
|
||||||
|
Loading…
Reference in New Issue
Block a user