From ebd74a258770e24868b1df01606ebcb14a636a03 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 1 Jun 2011 20:14:45 -0700 Subject: [PATCH] fix bug in framer that causes the occasional segfault --- src/lib/air_modes_framer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/air_modes_framer.cc b/src/lib/air_modes_framer.cc index 56095a1..bbf87a9 100644 --- a/src/lib/air_modes_framer.cc +++ b/src/lib/air_modes_framer.cc @@ -64,6 +64,7 @@ int air_modes_framer::work(int noutput_items, float *outraw = (float *) output_items[0]; //unsigned char *outattrib = (unsigned char *) output_items[0]; int size = noutput_items - d_check_width*2; + if(size < 0) return 0; float reference_level; framer_packet_type packet_attrib; std::vector tags;