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>
This commit is contained in:
parent
e53298ab1f
commit
79fcfa10f4
@ -63,7 +63,7 @@ reloadcurrentslide(int sig)
|
|||||||
if (sig == SIGHUP) {
|
if (sig == SIGHUP) {
|
||||||
clear();
|
clear();
|
||||||
refresh();
|
refresh();
|
||||||
printw("%s", currentslidep);
|
printw("%.*s", currentslidelen, currentslidep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ show:
|
|||||||
loadcurrentslide(slidefiles, currentslide);
|
loadcurrentslide(slidefiles, currentslide);
|
||||||
clear();
|
clear();
|
||||||
refresh();
|
refresh();
|
||||||
printw("%s", currentslidep);
|
printw("%.*s", currentslidelen, currentslidep);
|
||||||
|
|
||||||
again:
|
again:
|
||||||
c = getch();
|
c = getch();
|
||||||
|
Loading…
Reference in New Issue
Block a user