1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix NULL ptr dereference in api/status request

This commit is contained in:
Steffen Vogel 2021-10-15 09:32:12 +02:00
parent d674ba6bf8
commit ba9c7609ae

View file

@ -96,6 +96,8 @@ public:
float f_load = 1.f / (1 << SI_LOAD_SHIFT);
tzset();
json_error_t err;
json_t *json_status = json_pack_ex(&err, 0, "{ s: s, s: s, s: s, s: s, s: s, s: s, s: s, s: f, s: f, s: { s: s, s: I, s: b }, s: { s: s, s: s, s: s, s: s, s: s, s: s}, s: { s: i, s: i, s: I, s: I, s: [ f, f, f ], s: { s: I, s, I, s: I, s: I }, s: { s: I, s: I }, s: { s: I, s: I } } }",
"state", stateToString(sn->getState()).c_str(),