From 3de93a9503b8dc7e20345bc1d7838ba50c56bfa7 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 28 Aug 2019 12:32:03 +0200 Subject: #559 fix out of bound array access This patch change the size of the array ptrPar from 6 to 7. cppcheck says: [sources/ogAdmServer.cpp:598]: (error) Array 'ptrCfg[6]' accessed at index 6, which is out of bounds. --- sources/ogAdmServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources') diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index b387541..1c78422 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -534,7 +534,7 @@ bool actualizaConfiguracion(Database db, Table tbl, char *cfg, int ido) { char msglog[LONSTD], sqlstr[LONSQL]; int lon, p, c,i, dato, swu, idsoi, idsfi,k; - char *ptrPar[MAXPAR], *ptrCfg[6], *ptrDual[2], tbPar[LONSTD]; + char *ptrPar[MAXPAR], *ptrCfg[7], *ptrDual[2], tbPar[LONSTD]; char *ser, *disk, *par, *cpt, *sfi, *soi, *tam, *uso; // Parametros de configuración. lon = 0; -- cgit v1.2.3-18-g5258