Avoid string overflow

This commit is contained in:
Nyall Dawson 2015-02-16 16:09:16 +11:00
parent 153dea25e4
commit e6f91ca4b2

View File

@ -613,7 +613,9 @@ bool QgsSpatiaLiteConnection::isRasterlite1Datasource( sqlite3 * handle, const c
char table_raster[4192];
char sql[4192];
strcpy( table_raster, table );
strncpy( table_raster, table, 4192 );
table_raster[4191] = '\0';
len = strlen( table_raster );
if ( strlen( table_raster ) < 9 )
return false;