diff src/ov-fcn-handle.cc @ 8378:7d0492aa522d

fix use of uninitialized buffers
author Jaroslav Hajek <highegg@gmail.com>
date Sat, 06 Dec 2008 07:48:35 +0100
parents 25bc2d31e1bf
children eb63fbe60fab
line wrap: on
line diff
--- a/src/ov-fcn-handle.cc	Wed Oct 29 16:52:10 2008 +0100
+++ b/src/ov-fcn-handle.cc	Sat Dec 06 07:48:35 2008 +0100
@@ -474,7 +474,7 @@
     swap_bytes<4> (&tmp);
 
   OCTAVE_LOCAL_BUFFER (char, ctmp1, tmp+1);
-  is.read (ctmp1, tmp);
+  is.get (ctmp1, tmp+1, 0);
   nm = std::string (ctmp1);
 
   if (! is)
@@ -497,7 +497,7 @@
 	swap_bytes<4> (&tmp);
 
       OCTAVE_LOCAL_BUFFER (char, ctmp2, tmp+1);
-      is.read (ctmp2, tmp);
+      is.get (ctmp2, tmp+1, 0);
 
       symbol_table::scope_id local_scope = symbol_table::alloc_scope ();