gordonjcp / aprsmap

An APRS application using osm-gps-map
19 stars 4 forks source link

Course-based Segfault #6

Closed Hibby closed 13 years ago

Hibby commented 13 years ago

Based on the fact that some mobile (symbol "/>") APRS stations beacon location data with no course and speed, aprs will shit itself and dump it's core if this happens.

Proposed solution: validate that course and speed are not null pointers before printing to stdout.

Error exists in this code block ~ roughly line 112, mapviewer.c

if (strcmp (symb, wx) == 0) { osm_gps_map_image_add(map,*(packet->latitude), *(packet->longitude), g_wx_image); printf("WX Station"); } else if (strcmp (symb, car) == 0) { printf("Course: %d\n", *(packet->course)); printf("Speed: %fkm/h\n", *(packet->speed)); printf("Mobile Rig"); osm_gps_map_image_add(map,*(packet->latitude), *(packet->longitude), g_symbol1_image); } else { osm_gps_map_image_add(map,*(packet->latitude), *(packet->longitude), g_star_image); }

Hibby commented 13 years ago

solution posted by mgdm in his fork, merged into master by gjcp.