mirror of https://git.48k.eu/ogserver
#580 Fix uninitialized variables in ogAdmServer
This patch ensures that some variables are initialized before using them.master
parent
ad2d308436
commit
1c0eaf2fa6
|
@ -1961,6 +1961,8 @@ static bool RESPUESTA_InventarioHardware(TRAMA* ptrTrama, struct og_client *cli)
|
||||||
|
|
||||||
if (buffer)
|
if (buffer)
|
||||||
res=actualizaHardware(dbi, buffer, ido, npc, idc);
|
res=actualizaHardware(dbi, buffer, ido, npc, idc);
|
||||||
|
else
|
||||||
|
res = false;
|
||||||
|
|
||||||
liberaMemoria(iph);
|
liberaMemoria(iph);
|
||||||
liberaMemoria(ido);
|
liberaMemoria(ido);
|
||||||
|
@ -2290,6 +2292,8 @@ static bool RESPUESTA_InventarioSoftware(TRAMA* ptrTrama, struct og_client *cli)
|
||||||
buffer = rTrim(leeArchivo(sft));
|
buffer = rTrim(leeArchivo(sft));
|
||||||
if (buffer)
|
if (buffer)
|
||||||
res=actualizaSoftware(dbi, buffer, par, ido, npc, idc);
|
res=actualizaSoftware(dbi, buffer, par, ido, npc, idc);
|
||||||
|
else
|
||||||
|
res = false;
|
||||||
|
|
||||||
liberaMemoria(iph);
|
liberaMemoria(iph);
|
||||||
liberaMemoria(ido);
|
liberaMemoria(ido);
|
||||||
|
@ -2366,6 +2370,7 @@ bool actualizaSoftware(struct og_dbi *dbi, char *sft, char *par,char *ido,
|
||||||
if (lon > MAXSOFTWARE)
|
if (lon > MAXSOFTWARE)
|
||||||
lon = MAXSOFTWARE; // Limita el número de componentes software
|
lon = MAXSOFTWARE; // Limita el número de componentes software
|
||||||
|
|
||||||
|
idnombreso = 0;
|
||||||
for (i = 0; i < lon; i++) {
|
for (i = 0; i < lon; i++) {
|
||||||
// Primera línea es el sistema operativo: se obtiene identificador
|
// Primera línea es el sistema operativo: se obtiene identificador
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|
Loading…
Reference in New Issue