diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-03-19 14:48:27 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-03-19 14:48:34 +0100 |
commit | f844a1b6bcee3107fc6669479dea728b39d7b74d (patch) | |
tree | 47feea0b4ec253f7f2c0619a8faf0f13189c0a47 | |
parent | e6c2c26f09b65e4c4817ab4f77d4a08e52bd121d (diff) |
#971 check for NULL serial number
ogclient might return an empty serial number.
-rw-r--r-- | src/ogAdmServer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ogAdmServer.c b/src/ogAdmServer.c index fa7e29a..0500496 100644 --- a/src/ogAdmServer.c +++ b/src/ogAdmServer.c @@ -61,7 +61,7 @@ bool actualizaConfiguracion(struct og_dbi *dbi, char *cfg, int ido) if (i == 0 && c == 1) { splitCadena(ptrDual, ptrCfg[0], '='); ser = ptrDual[1]; - if (strlen(ser) > 0) { + if (ser && strlen(ser) > 0) { // Solo actualizar si número de serie no existía. result = dbi_conn_queryf(dbi->conn, "UPDATE ordenadores SET numserie='%s'" |