-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
In https://github.com/ossimlabs/ossim-plugins/blob/master/cnes/src/EnvisatAsar/mph.cpp#L228
Line 228, buf1 is defined as an array of one char. Later (line 249), it's assigned into a std::string.
As there is no guarantee the array is null terminated, an invalid read will be performed. Either the array shall become a single char, or it should be made of two chars, the last one being null.
BTW, no need to write the copy constructor nor the assignment operator, the default generated ones will be fine as the class is made of copyable and assignable attributes. This way, it'll also permit the compiler to generate the move constructor and the move assignment operator in C++11.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels