Merge pull request #1510 from ledeuns/patch-1

Fix crash on backward memcpy()
This commit is contained in:
John Cupitt 2019-12-30 17:40:55 +00:00 committed by GitHub
commit 4169e1a0fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -879,7 +879,7 @@ extract_prefix( const char *dir, const char *name )
for( i = 0; i < (int) strlen( vname ); i++ )
if( vips_isprefix( G_DIR_SEPARATOR_S "." G_DIR_SEPARATOR_S,
vname + i ) )
memcpy( vname + i, vname + i + 2,
memmove( vname + i, vname + i + 2,
strlen( vname + i + 2 ) + 1 );
if( vips_ispostfix( vname, G_DIR_SEPARATOR_S "." ) )
vname[strlen( vname ) - 2] = '\0';