mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:33:38 +03:00
ftplistparser: clear strings.target if not symlink
When the struct is passed to the CURLOPT_CHUNK_BGN_FUNCTION callback, clear the pointer if the provided data is not a symlink. Closes #21884
This commit is contained in:
parent
38b72f3b56
commit
317bf7e8a8
1 changed files with 3 additions and 2 deletions
|
|
@ -310,8 +310,9 @@ static CURLcode ftp_pl_insert_finfo(struct Curl_easy *data,
|
||||||
str + parser->offsets.group : NULL;
|
str + parser->offsets.group : NULL;
|
||||||
finfo->strings.perm = parser->offsets.perm ?
|
finfo->strings.perm = parser->offsets.perm ?
|
||||||
str + parser->offsets.perm : NULL;
|
str + parser->offsets.perm : NULL;
|
||||||
finfo->strings.target = parser->offsets.symlink_target ?
|
finfo->strings.target = parser->offsets.symlink_target &&
|
||||||
str + parser->offsets.symlink_target : NULL;
|
(finfo->filetype == CURLFILETYPE_SYMLINK) ?
|
||||||
|
str + parser->offsets.symlink_target : NULL;
|
||||||
finfo->strings.time = str + parser->offsets.time;
|
finfo->strings.time = str + parser->offsets.time;
|
||||||
finfo->strings.user = parser->offsets.user ?
|
finfo->strings.user = parser->offsets.user ?
|
||||||
str + parser->offsets.user : NULL;
|
str + parser->offsets.user : NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue