aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-03-12 17:11:01 +0100
committerBoris Faure <billiob@gmail.com>2016-03-12 17:11:01 +0100
commit8d0e13eff96a2ae6bbbaebf9617e82912189ade7 (patch)
tree1c4aec5028e8cb4fd2867716167c86945a409517
parentonly launch terminology with -d CWD if CWD. CID1352818 (diff)
downloadterminology-8d0e13eff96a2ae6bbbaebf9617e82912189ade7.tar.gz
ensure CWD is NULL-terminated. CID1352820
-rw-r--r--src/bin/termio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 2d3a941..c36df0d 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -525,10 +525,12 @@ termio_cwd_get(const Evas_Object *obj, char *buf, size_t size)
procpath, strerror(errno));
return EINA_FALSE;
}
- buf[siz] = 0;
+ buf[siz] = '\0';
#endif
+ buf[size -1] = '\0';
+
return EINA_TRUE;
}