Skip to content

Commit a94cadf

Browse files
committedFeb 19, 2015
avoid repeating the array dimension (followup e6f91ca)
1 parent 5836d1d commit a94cadf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/providers/spatialite/qgsspatialiteconnection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ bool QgsSpatiaLiteConnection::isRasterlite1Datasource( sqlite3 * handle, const c
613613
char table_raster[4192];
614614
char sql[4192];
615615

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

619619
len = strlen( table_raster );
620620
if ( strlen( table_raster ) < 9 )

0 commit comments

Comments
 (0)
Please sign in to comment.