Fix crash on backward memcpy()

In some environment, building fails because of backward memcpy().
This commit is contained in:
Denis Fondras 2019-12-30 18:29:36 +01:00 committed by GitHub
parent c65e399c48
commit 837ca2e044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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';