summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-19 04:05:16 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-19 04:05:16 -0400
commit6129737a0805c17c36ce2984605b14c5a00a0d11 (patch)
tree610fdd5a36bead0bd5039d6b4044609046c21b6f /ais_json.c
parent1bb68f622980eb1daf3cd7d4ed189f31522e937f (diff)
downloadgpsd-6129737a0805c17c36ce2984605b14c5a00a0d11.tar.gz
Prevent false matching of the Inland AIS shape on unstructured Type 8s.
Also, add a regression test for this.
Diffstat (limited to 'ais_json.c')
-rw-r--r--ais_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ais_json.c b/ais_json.c
index 76f98966..4d31ba87 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -397,7 +397,7 @@ int json_ais_read(const char *buf,
structured = true;
}
}
- else if (strstr(buf, "\"dac\":200,") != NULL) {
+ else if (strstr(buf, "\"dac\":200,") != NULL && strstr(buf,"data")==NULL) {
if (strstr(buf, "\"fid\":10,") != NULL) {
status = json_read_object(buf, json_ais8_fid10, endptr);
structured = true;