gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: New Defects reported by Coverity Scan for gpsd-gitlab


From: James Browning
Subject: Re: Fw: New Defects reported by Coverity Scan for gpsd-gitlab
Date: Tue, 26 Jan 2021 07:45:08 -0800

On Tue, Jan 26, 2021, at 5:49 AM Greg Troxel <gdt@lexort.com> wrote:

"Gary E. Miller" <gem@rellim.com> writes:

>>>>     CID 316451:    (UNINIT)
>>>>     Using uninitialized value "g.fix.speed" when calling "wprintw".
>>>> 
> 242         (void)wprintw(navsolwin, "%6.2fm/s %5.1fo %6.2fm/s",
> 243                       g.fix.speed, g.fix.track, g.fix.climb);

I tried to just read the code, and I see g is on the stack, and a bunch
of things are set from the provided data, and I can't find where speed
is ever set.  So this does look like an uninitialized read.

How and where do you think g.fix.speed will have been set?

The only thing I can think of is that ecef_to_wgs84fix might leak.
The parts are there for speed, climb, and track but not I think
epv.  I however do not understand the math.

reply via email to

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