Skip to content
Snippets Groups Projects
Commit 30d5d834 authored by Aaron Brashears's avatar Aaron Brashears
Browse files

bail if data_size is zero. crashes windows application since it throws an...

bail if data_size is zero. crashes windows application since it throws an exception. undefined behavior is undefined. DEV-28045
parent cdbd97c4
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,12 @@ void LLSDMessageReader::getBinaryData(const char *block, const char *var,
data_size = max_size;
}
// Calls to memcpy will fail if data_size is not positive.
// Phoenix 2009-02-27
if(data_size <= 0)
{
return;
}
memcpy(datap, &(data[0]), data_size);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment