Diff between 5050a95c01b20e409153d7de0da649e43b5239f3 and 0518048263cc2a0a638e6924d164d7a00b934240
Changed Files
| File | Additions | Deletions | Status |
| profiles/health/hdp.c | +3 | -0 | modified |
Full Patch
diff --git a/profiles/health/hdp.c b/profiles/health/hdp.c
index d256c9f..4f90380 100644
--- a/profiles/health/hdp.c
+++ b/profiles/health/hdp.c
@@ -863,7 +863,10 @@ static gboolean serve_echo(GIOChannel *io_chan, GIOCondition cond,
chan->edata->echo_done = TRUE;
fd = g_io_channel_unix_get_fd(io_chan);
+
len = read(fd, buf, sizeof(buf));
+ if (len < 0)
+ goto fail;
if (send_echo_data(fd, buf, len) >= 0)
return TRUE;