fix an out-of-bounds read if the input is "" - sic - simple irc client
 (HTM) git clone git://git.suckless.org/sic
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit df4c0611366bf361fa263fbc57009cbe68456855
 (DIR) parent ec293427a0cc2ef7f561a60347ce940d567efb72
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Thu,  6 May 2021 01:04:35 +0200
       
       fix an out-of-bounds read if the input is ""
       
       Notified by Guilherme Janczak <guilherme.janczak@yandex.com>, thanks!
       
       Diffstat:
         M util.c                              |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/util.c b/util.c
       @@ -61,7 +61,7 @@ trim(char *s) {
                char *e;
        
                e = s + strlen(s) - 1;
       -        while(isspace(*e) && e > s)
       +        while(e > s && isspace(*e))
                        e--;
                *(e + 1) = '\0';
        }