Merge pull request #1510 from ledeuns/patch-1
Fix crash on backward memcpy()
This commit is contained in:
commit
4169e1a0fd
@ -879,7 +879,7 @@ extract_prefix( const char *dir, const char *name )
|
|||||||
for( i = 0; i < (int) strlen( vname ); i++ )
|
for( i = 0; i < (int) strlen( vname ); i++ )
|
||||||
if( vips_isprefix( G_DIR_SEPARATOR_S "." G_DIR_SEPARATOR_S,
|
if( vips_isprefix( G_DIR_SEPARATOR_S "." G_DIR_SEPARATOR_S,
|
||||||
vname + i ) )
|
vname + i ) )
|
||||||
memcpy( vname + i, vname + i + 2,
|
memmove( vname + i, vname + i + 2,
|
||||||
strlen( vname + i + 2 ) + 1 );
|
strlen( vname + i + 2 ) + 1 );
|
||||||
if( vips_ispostfix( vname, G_DIR_SEPARATOR_S "." ) )
|
if( vips_ispostfix( vname, G_DIR_SEPARATOR_S "." ) )
|
||||||
vname[strlen( vname ) - 2] = '\0';
|
vname[strlen( vname ) - 2] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user