Skip to content
Permalink
Browse files

Avoid string overflow

  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent 153dea2 commit e6f91ca4b2737378c368172b5045d3677a8c24ce
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/providers/spatialite/qgsspatialiteconnection.cpp
@@ -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;

0 comments on commit e6f91ca

Please sign in to comment.
You can’t perform that action at this time.