patch-gnuradio
[Top][All Lists]
Advanced

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

Re: [Patch-gnuradio] Patch for gr_map_bb


From: Eric Blossom
Subject: Re: [Patch-gnuradio] Patch for gr_map_bb
Date: Wed, 5 Sep 2007 09:50:40 -0700
User-agent: Mutt/1.5.9i

On Wed, Sep 05, 2007 at 12:07:30PM -0400, Richard Alimi wrote:
> Attached is a one-line fix for gr_map_bb.  The original code would cause a 
> segfault in certain instances due to reading past the end of the vector 
> supplied to the constructor.
> 
> Thanks,
> Rich

> Index: gnuradio-core/src/lib/general/gr_map_bb.cc
> ===================================================================
> --- gnuradio-core/src/lib/general/gr_map_bb.cc        (revision 6314)
> +++ gnuradio-core/src/lib/general/gr_map_bb.cc        (working copy)
> @@ -41,7 +41,7 @@
>    for (int i = 0; i < 0x100; i++)
>      d_map[i] = i;
>  
> -  unsigned int size = std::max((size_t) 0x100, map.size());
> +  unsigned int size = std::min((size_t) 0x100, map.size());
>    for (unsigned int i = 0; i < size; i++)
>      d_map[i] = map[i];
>  }

Thanks!

I'm applying it right now.

Eric




reply via email to

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