From 428a845b20fbee78925aa162c26ec4719a7aac0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 22 Jul 2021 09:56:34 +0200 Subject: Allocate correct size for fs --- fref.lex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fref.lex b/fref.lex index 2eaa19d..ddfa71d 100644 --- a/fref.lex +++ b/fref.lex @@ -295,7 +295,7 @@ pf(char *fmt, ...) if(*p == '%' || *p == '*') n++; - if(!(fs = malloc(n))) + if(!(fs = malloc(sizeof(char *)*n))) err(1, "malloc"); /* -- cgit v1.2.3