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
commit3de93a9503b8dc7e20345bc1d7838ba50c56bfa7 (patch)
treedf1a6bf6d527d85968bdb799a5e1938c2e480d3a
parent882fec820e79c76072b2178acd683101a474649c (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--sources/ogAdmServer.cpp2
1 files changed, 1 insertions, 1 deletions
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;