billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=240a4a02d331c549b74867d83203406d5f803bc5
commit 240a4a02d331c549b74867d83203406d5f803bc5 Author: Boris Faure <[email protected]> Date: Mon Dec 19 23:38:32 2016 +0100 termpty: fix potential NULL dereference. CID1367485 --- src/bin/termptyops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index ff668cc..0a69ed2 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -267,9 +267,12 @@ termpty_clear_line(Termpty *ty, Termpty_Clear mode, int limit) void termpty_clear_tabs_on_screen(Termpty *ty) { - memset(ty->tabs, 0, - DIV_ROUND_UP(ty->w, sizeof(unsigned int) * 8u) - * sizeof(unsigned int)); + if (ty->tabs) + { + memset(ty->tabs, 0, + DIV_ROUND_UP(ty->w, sizeof(unsigned int) * 8u) + * sizeof(unsigned int)); + } } --
