* src/ftp-ls.c (ftp_parse_vms_ls): Fix heap-buffer-overflow

This commit is contained in:
Tim Rühsen 2018-04-21 22:45:03 +02:00
parent c7014fbaea
commit b3ff8ce3d5

View File

@ -731,8 +731,8 @@ ftp_parse_vms_ls (FILE *fp)
*/
#if (!defined( __VMS) && !defined( PRESERVE_VMS_VERSIONS))
for (p = tok + strlen (tok); (--p > tok) && c_isdigit( *p); );
if ((*p == ';') && (*(p- 1) != '^'))
for (p = tok + strlen (tok); (--p > tok) && c_isdigit(*p); );
if (p > tok && (*p == ';') && (*(p - 1) != '^'))
{
*p = '\0';
}