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 _______________________________________________ Patch-gnuradio mailing list Patch-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/patch-gnuradio