Introduction
Introduction Statistics Contact Development Disclaimer Help
print the exact amount of mmap'd data - catpoint - Catpoint simple presenting s…
git clone git://bitreich.org/catpoint/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrin…
Log
Files
Refs
Tags
README
LICENSE
---
commit 79fcfa10f48e539001da1288f7a084f07b895abf
parent e53298ab1f62fbae87d2c139e30ead81a400d0ce
Author: Hiltjo Posthuma <[email protected]>
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 <[email protected]>
Diffstat:
M 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();
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.