1
0
Fork 0

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.
This commit is contained in:
david 2003-03-02 16:37:48 +00:00
parent 45f3eb7f99
commit 648f1208f8

View file

@ -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;