summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-09 18:58:05 +0100
committerLennart Poettering <lennart@poettering.net>2015-03-09 18:58:05 +0100
commitdf4573e85190759e39b417d4d4a8c73eda6a05e5 (patch)
treec328025c7936281c556957044a6b41ed57ee95f2 /src
parent0b02c7c36dbb6f2ec7434eb8d18e0410ee1cc74c (diff)
fsck: don't read invalid data
Diffstat (limited to 'src')
-rw-r--r--src/fsckd/fsckd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
index 0fac1531ee..77808608ac 100644
--- a/src/fsckd/fsckd.c
+++ b/src/fsckd/fsckd.c
@@ -171,11 +171,11 @@ static int plymouth_feedback_handler(sd_event_source *s, int fd, uint32_t revent
return 0;
}
- if (buffer[0] == '\15')
+ if (l > 1 && buffer[0] == '\15')
log_error("Message update to plymouth wasn't delivered successfully");
/* the only answer support type we requested is a key interruption */
- if (buffer[0] == '\2' && buffer[5] == '\3') {
+ if (l > 2 && buffer[0] == '\2' && buffer[5] == '\3') {
m->cancel_requested = true;
/* cancel all connected clients */