From 648f1208f83e26ba3ac225a46a61c747e101f29d Mon Sep 17 00:00:00 2001
From: david <david>
Date: Sun, 2 Mar 2003 16:37:48 +0000
Subject: [PATCH] Patch from Frederic Bouvier:

arrays of insufficient size are allocated in prop_picker.cxx ( size()
don't count the null char ) and strcpy is writing outside the allocated
array. A patch follow.
---
 src/GUI/prop_picker.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/GUI/prop_picker.cxx b/src/GUI/prop_picker.cxx
index aed464a4d..445128d34 100755
--- a/src/GUI/prop_picker.cxx
+++ b/src/GUI/prop_picker.cxx
@@ -445,11 +445,11 @@ void fgPropPicker::find_props ()
     files = new char* [ num_files+1 ] ;
 
     stdString line = ".";
-    files [ 0 ] = new char[line.size()];
+    files [ 0 ] = new char[line.size() + 1];
     strcpy ( files [ 0 ], line.c_str() );
 
     line = "..";
-    files [ 1 ] = new char[line.size()];
+    files [ 1 ] = new char[line.size() + 1];
     strcpy ( files [ 1 ], line.c_str() );
 
     pi = 2;