summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
Diffstat (limited to 'navit')
-rw-r--r--navit/navit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/navit.c b/navit/navit.c
index f01c9efcd..e6e43064d 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1806,6 +1806,8 @@ static int navit_former_destinations_active(struct navit *this_) {
if (destination_file) {
while(fgets(lastline, sizeof(lastline), destination_file));
fclose(destination_file);
+ /*forcefully terminate the string, there is no proper fgets error handling.*/
+ lastline[sizeof(lastline) -1] = 0;
if (strcmp(lastline, TEXTFILE_COMMENT_NAVI_STOPPED)) {
active=1;
}