In the function ReadArgsFromAddressSpaceFile we should fail the entire
operation instead of just breaking while comparing offsets. Otherwise,
we might get a DynBufArray with some elements having a NULL for the
buffer. This may lead to a NULL pointer dereference in
ExtractCommandLineFromAddressSpaceFile.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
* argOff[i] + strlen(arg[i]) + 1 should be equal to argOff[i + 1].
*/
if ((argOff == 0) || (argOff != nextArgOff)) {
- break;
+ goto fail;
}
argBuf = ExtractArgStringFromAddressSpaceFile(asFd, argOff);
if (argBuf == NULL) {