[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: Christian Gagneraud
Subject: Re: [gpsd-dev] Tricky bug in the json parser
Date: Wed, 20 Jun 2012 10:45:50 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120421 Thunderbird/12.0

On 20/06/12 01:52, Eric S. Raymond wrote:
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:

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
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?

Yes, it is in my local branch. The needed changes are part of a big patch that fixes all the issues found in the AIS code. I didn't try to split that patch, because there are really plenty of small changes all around the place (touching only AIS code).


Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Tel: + 353 (0) 1 236 5990

reply via email to

[Prev in Thread] Current Thread [Next in Thread]