From d6aa50f74c65c96846c774cb8f949387bf07a9ed Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 14 Dec 2020 21:25:11 +0100 Subject: [PATCH] * src/emacs.c (read_full): Add a few assertions. --- src/emacs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index 92f6bfe636f..9d7b21cc76a 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -973,6 +973,9 @@ emacs_seccomp (unsigned int operation, unsigned int flags, void *args) static ptrdiff_t read_full (int fd, void *buffer, ptrdiff_t size) { + eassert (0 <= fd); + eassert (buffer != NULL); + eassert (0 <= size); enum { /* See MAX_RW_COUNT in sysdep.c. */ -- 2.39.2