discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Fwd: New Defects reported by Coverity Scan for GNURad


From: Philip Balister
Subject: [Discuss-gnuradio] Fwd: New Defects reported by Coverity Scan for GNURadio
Date: Mon, 03 Mar 2014 16:58:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

The latest Coverity scan showed these new items. We should probably
double check them. The Null dereference is likely related to the order
in which some class methods get called.

The compare against zero of an unsigned number should be checked to make
sure that is what was really meant.

Philip



** CID 1189412:  Explicit null dereferenced  (FORWARD_NULL)
/var/lib/jenkins/jobs/GNURadio-master/workspace/gnuradio/gr-filter/lib/fft_filter.cc:
355 in gr::filter::kernel::fft_filter_ccf::fft_filter_ccf(int, const
std::vector<float, std::allocator<float>> &, int)()

** CID 1189413:  Unsigned compared against 0  (NO_EFFECT)
/var/lib/jenkins/jobs/GNURadio-master/workspace/gnuradio/gr-filter/lib/pfb_synthesizer_ccf_impl.cc:
225 in gr::filter::pfb_synthesizer_ccf_impl::set_channel_map(const
std::vector<int, std::allocator<int>> &)()


________________________________________________________________________________________________________
*** CID 1189412:  Explicit null dereferenced  (FORWARD_NULL)
/var/lib/jenkins/jobs/GNURadio-master/workspace/gnuradio/gr-filter/lib/fft_filter.cc:
355 in gr::filter::kernel::fft_filter_ccf::fft_filter_ccf(int, const
std::vector<float, std::allocator<float>> &, int)()
349
/**************************************************************/
350
351
352           fft_filter_ccf::fft_filter_ccf(int decimation,
353                                          const std::vector<float> &taps,
354                                          int nthreads)
>>>     CID 1189412:  Explicit null dereferenced  (FORWARD_NULL)
>>>     Assigning: "this->d_fwdfft" = "NULL".
355             : d_fftsize(-1), d_decimation(decimation), d_fwdfft(0),
356               d_invfft(0), d_nthreads(nthreads), d_xformed_taps(NULL)
357           {
358             set_taps(taps);
359           }
360

________________________________________________________________________________________________________
*** CID 1189413:  Unsigned compared against 0  (NO_EFFECT)
/var/lib/jenkins/jobs/GNURadio-master/workspace/gnuradio/gr-filter/lib/pfb_synthesizer_ccf_impl.cc:
225 in gr::filter::pfb_synthesizer_ccf_impl::set_channel_map(const
std::vector<int, std::allocator<int>> &)()
219         {
220           gr::thread::scoped_lock guard(d_mutex);
221
222           if(map.size() > 0) {
223             unsigned int max = (unsigned
int)*std::max_element(map.begin(), map.end());
224             unsigned int min = (unsigned
int)*std::min_element(map.begin(), map.end());
>>>     CID 1189413:  Unsigned compared against 0  (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true. "min 
>>> < 0U".
225             if((max >= d_twox*d_numchans) || (min < 0)) {
226               throw
std::invalid_argument("pfb_synthesizer_ccf_impl::set_channel_map: map
range out of bounds.\n");
227             }
228             d_channel_map = map;
229
230             // Zero out fft buffer so that unused channels are always 0



reply via email to

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