FTP: More EPLF 'm' timestamp parsing fixes
The m case in ftpListParseParts() reversed the strtol() validity
check. We broke out when any digits were consumed instead of only when
no conversion happened. As a result, valid epoch timestamps were treated
as invalid and p->date was often left unset.
Also guard against ctime() returning nil and avoid null pointer dereference if no newline is present in ctime() output.
Also reject m entries with trailing garbage.
Cannot create a git commit message from PR title and description.
Error while parsing future commit message title: the line is too long 73>72
Problematic parser input:
FtpGateway: fix 'm' timestamp parsing; guard ctime(); trim safely (#2207)
Please see PR title and description formatting requirements for more details.
This message was added by Anubis bot. Anubis will add a new message if the error text changes. Anubis will remove M-failed-description label when there are no corresponding failures to report.
run this PR through the tests
Done, no problems were found.
I adjusted PR description a little to mention trailing garbage handling and to avoid retelling the fairly clear diff when it comes to strstr() refactoring. I am not against adding some text about that refactoring though.