[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Tricky bug in the json parser
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] Tricky bug in the json parser |
Date: |
Tue, 19 Jun 2012 20:52:13 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Christian Gagneraud <address@hidden>:
> Hi all,
>
> I just have one last bug to fix from my live test campaign. and it
> is a bit tricky to understand for me as I have to dive into the
> hairy json.c.
>
> So basically, here are 2 AIS sentences which contain an array of 1 struct:
> !AIVDM,1,1,,A,address@hidden,0*02
> !AIVDM,1,1,,A,6h2E3N0rThqP0600J00000000000,0*51
>
> The dumping doesn't seems to cause any trouble, but reading back the
> JSON crashes gpsdecode:
> echo '!AIVDM,1,1,,A,address@hidden,0*02' | gpsdecode -ju
> {"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":false,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-16777216,"lat":0,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0}]}
> echo '!AIVDM,1,1,,A,address@hidden,0*02' | gpsdecode
> -ju | gpsdecode -jeu
> Segmentation fault
>
> I saw some other messages with arrays of 0 structures, they don't
> crash the json parser.
I'm getting back to GPSD after spending a week and a half immersed in
another project. Did this one get fixed?
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>