From e3c28f8a86de471cf3e9b0822e28735d42a525d7 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 21 Mar 2014 14:18:36 -0400 Subject: [PATCH] fgets into buf directly, rather than the stack --- src/psl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psl.c b/src/psl.c index c011137..5a2f819 100644 --- a/src/psl.c +++ b/src/psl.c @@ -281,7 +281,7 @@ psl_ctx_t *psl_load_file(const char *fname) psl->suffix_exceptions = _vector_alloc(64, _suffix_compare); if ((fp = fopen(fname, "r"))) { - while ((linep = fgets(&buf, sizeof(buf), fp))) { + while ((linep = fgets(buf, sizeof(buf), fp))) { while (isspace(*linep)) linep++; // ignore leading whitespace if (!*linep) continue; // skip empty lines