Signed-off-by: Sven Eckelmann sven@open-mesh.com --- client.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/client.c b/client.c index 3c1916c..2187ff2 100644 --- a/client.c +++ b/client.c @@ -81,6 +81,9 @@ int alfred_client_request_data(struct globals *globals) ret = read(globals->unix_sock, buf + sizeof(*push), sizeof(*data));
+ if (ret < (ssize_t)sizeof(*data)) + break; + data = push->data; data_len = ntohs(data->header.length);