]> git.gag.com Git - debian/gnuradio/commitdiff
Potentially invalid read deferred until it's valid (Dan Halperin)
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 Apr 2008 04:36:05 +0000 (04:36 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 30 Apr 2008 04:36:05 +0000 (04:36 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8296 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/lib/general/gr_complex_to_xxx.cc

index 73435259f0790fb4160b8fdf6d6910077e9690a4..abffa4da13324a4b6dea4b62cfd3dfe5b3e5f2d3 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -51,7 +51,7 @@ gr_complex_to_float::work (int noutput_items,
 {
   const gr_complex *in = (const gr_complex *) input_items[0];
   float *out0 = (float *) output_items[0];
-  float *out1 = (float *) output_items[1];
+  float* out1;
   int noi = noutput_items * d_vlen;
 
   switch (output_items.size ()){
@@ -62,6 +62,7 @@ gr_complex_to_float::work (int noutput_items,
     break;
 
   case 2:
+    out1 = (float *) output_items[1];
     for (int i = 0; i < noi; i++){
       out0[i] = in[i].real ();
       out1[i] = in[i].imag ();