hirc

IRC client
Log | Files | Refs

commit 41eb89eb9f7a4aa4db6f29e6606b0e05c3e089a6
parent 4094de1f2b28dff3711a6b8ff65d22b0fd38e127
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  2 Dec 2021 13:38:26 +0000

ui.c: overflow check for ui_format_get_content

Diffstat:
Mui.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui.c b/ui.c @@ -831,7 +831,7 @@ ui_format_get_content(char *sstr, int nesting) { static char ret[8192]; int layer, rc; - for (layer = 0, rc = 0; sstr && *sstr; sstr++) { + for (layer = 0, rc = 0; sstr && *sstr && rc < sizeof(ret); sstr++) { switch (*sstr) { case '}': if (nesting && layer) {