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:
parent
45f3eb7f99
commit
648f1208f8
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue