oops overflow

thanks lovell
This commit is contained in:
John Cupitt 2016-02-09 15:55:22 +00:00
parent 4a63e961ea
commit fc7691b04a
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ vips_foreign_load_svg_is_a_buffer( const void *buf, size_t len )
if( !isascii( str[i] ) ) if( !isascii( str[i] ) )
return( 0 ); return( 0 );
for( i = 0; i < 200 && i < len; i++ ) { for( i = 0; i < 200 && i < len - 5; i++ ) {
char txt[5]; char txt[5];
/* 5, since we include the \0 at the end. /* 5, since we include the \0 at the end.