mlogger memory and odb corruption when making an XML dump
Issue #59
closed
mlogger is corrupting memory and corrupting ODB when making an XML dump of ODB into the output file. This is in log_odb_dump(). The size of the XML dump is around 671744 bytes. Increasing the initial buffer size to 100'000'000 does not fix the corruption. Turning off the XML dump makes the corruption go away. K.O.
Comments (5)
-
-
reporter - marked as blocker
-
-
assigned issue to
-
assigned issue to
-
reporter Fixed on branch midas-2017-10 and in the mxml repository. There were 2 bugs: incorrect memset() in mlogger and incorrect memory allocation in mxml. K.O.
-
reporter - changed status to closed
- Log in to comment
The buffer size in log_odb_dump() is extended dynamically (look at buffer_size *= 10;), so this cannot be the case. I don't see any other obvious place where a buffer overflow could happen. The XML library works since more than 15 years without any problem, so I doubt that it is a bug of the library. Can you put your ODB contents somewhere so that I can reproduce the problem?