Skip to content

Commit

Permalink
avoid repeating the array dimension (followup e6f91ca)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 19, 2015
1 parent 5836d1d commit a94cadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/spatialite/qgsspatialiteconnection.cpp
Expand Up @@ -613,8 +613,8 @@ bool QgsSpatiaLiteConnection::isRasterlite1Datasource( sqlite3 * handle, const c
char table_raster[4192];
char sql[4192];

strncpy( table_raster, table, 4192 );
table_raster[4191] = '\0';
strncpy( table_raster, table, sizeof sql );
table_raster[ sizeof sql - 1 ] = '\0';

len = strlen( table_raster );
if ( strlen( table_raster ) < 9 )
Expand Down

0 comments on commit a94cadf

Please sign in to comment.