From 4675676dea931d38d04f43701ce7ba94325fc4da Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Wed, 7 Apr 2021 12:18:27 +0200 Subject: [PATCH] add a missing allocation failure check in parsetoken() --- rcsparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rcsparse.c b/rcsparse.c index b490832..992c60c 100644 --- a/rcsparse.c +++ b/rcsparse.c @@ -255,6 +255,8 @@ parsetoken(struct rcsfile *rcs) return NULL; tok = checktok(rcs); + if (tok == NULL) + return NULL; ch = *rcs->pos; switch (ch) {