Skip to content
Permalink
Browse files

Fix potential buffer truncation

Forward ported from kadas-albireo
  • Loading branch information
manisandro authored and nyalldawson committed Jun 19, 2018
1 parent d360150 commit 16673ae9440d747852c2f06a35e61d64a4eac68c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/spatialite/qgsspatialiteconnection.cpp
@@ -572,10 +572,10 @@ bool QgsSpatiaLiteConnection::isRasterlite1Datasource( sqlite3 *handle, const ch
int columns;
bool exists = false;
char table_raster[4192];
char sql[4192];
char sql[4258];

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

size_t len = strlen( table_raster );
if ( strlen( table_raster ) < 9 )

0 comments on commit 16673ae

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