summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-08-28 12:32:03 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-08-28 18:39:33 +0200
commit0f1e5ad186f22282e2f810a9218707e436e9fa8f (patch)
treeffeb379283dc7f5147136eed4971da634cf9ffb9
parent1b539a7252f457d1225311dc55cd9b2e1c406d51 (diff)
#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.
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
index b387541f..1c784227 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
+++ b/admin/Sources/Services/ogAdmServer/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;