summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dankov <tryagain@navit-project.org>2015-09-13 01:15:44 +0300
committerMichael Dankov <tryagain@navit-project.org>2015-09-13 01:15:44 +0300
commitf7c86cf0ba50fff0e7454058af231e0f27d522d2 (patch)
tree6fb3e3d0fe3c380c7cbaff0b446986250b1657e5
parent2595cb3fd27c7852d5b08c91a7b82d821aaf264f (diff)
downloadnavit-f7c86cf0ba50fff0e7454058af231e0f27d522d2.tar.gz
Fix two memory related bugs in maptoolR6264
Related to town and turn restriction processing
-rw-r--r--navit/maptool/osm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index d8063c3a7..9f251b136 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -1904,6 +1904,9 @@ osm_process_town_by_is_in(struct item_bin *ib,char *is_in, struct attr *attrs, G
int find_town_name = 0;
+ if(!is_in)
+ return NULL;
+
if (item_is_district(*ib))
find_town_name = 1;
@@ -2635,7 +2638,7 @@ process_turn_restrictions_finish(GList *tr, FILE *out)
GList *l=tr;
while (l) {
struct turn_restriction *t=l->data;
- struct coord *c[4];
+ struct coord *c[4]={NULL,NULL,NULL,NULL};
struct item_bin *ib=tmp_item_bin;
if (!t->c_count[0]) {