catpoint

Catpoint simple presenting software.
git clone git://r-36.net/catpoint
Log | Files | Refs | LICENSE

commit 79fcfa10f48e539001da1288f7a084f07b895abf
parent e53298ab1f62fbae87d2c139e30ead81a400d0ce
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 20 Dec 2020 15:49:57 +0100

print the exact amount of mmap'd data

It could read past the mmap'd region (not using the NUL terminator).

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
catpoint.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catpoint.c b/catpoint.c @@ -63,7 +63,7 @@ reloadcurrentslide(int sig) if (sig == SIGHUP) { clear(); refresh(); - printw("%s", currentslidep); + printw("%.*s", currentslidelen, currentslidep); } } @@ -109,7 +109,7 @@ show: loadcurrentslide(slidefiles, currentslide); clear(); refresh(); - printw("%s", currentslidep); + printw("%.*s", currentslidelen, currentslidep); again: c = getch();