Explorar el Código

Merge pull request #39 from stoeckmann/fgets

On success, fgets always terminates the result.
master
Aaron Marcher hace 7 años
committed by GitHub
padre
commit
95ceafcae7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      slstatus.c

+ 1
- 1
slstatus.c Ver fichero

@@ -447,7 +447,7 @@ run_command(const char *cmd)
warn("Failed to get command output for %s", cmd);
return smprintf("%s", UNKNOWN_STR);
}
fgets(buf, sizeof(buf) - 1, fp);
fgets(buf, sizeof(buf), fp);
pclose(fp);
buf[sizeof(buf) - 1] = '\0';



Cargando…
Cancelar
Guardar