From f844a1b6bcee3107fc6669479dea728b39d7b74d Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Fri, 19 Mar 2021 14:48:27 +0100 Subject: #971 check for NULL serial number ogclient might return an empty serial number. --- src/ogAdmServer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'" -- cgit v1.2.3-18-g5258