From: Siraaj Khandkar Date: Wed, 25 Mar 2020 21:20:07 +0000 (-0400) Subject: Leave TODO to define a max after which to stop reading X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=9f40d4f2b2de2db149556318ec6f84994174ca6d;p=khatus.git Leave TODO to define a max after which to stop reading to avoid getting trapped by a rogue writer. --- diff --git a/x5/khatus.c b/x5/khatus.c index ccfce96..0580430 100644 --- a/x5/khatus.c +++ b/x5/khatus.c @@ -391,6 +391,11 @@ fifo_read_one(Fifo *f, struct timespec t, char *buf) if (f->pos_curr <= f->pos_final) buf[f->pos_curr++] = c; /* Drop beyond available range. */ + /* + * TODO Define max after which we stop reading. + * To ensure that a rogue large message + * doesn't trap us here. + */ } break; default: