The function EncodeHex in server/drivers/encode.cc does not null-terminate the c-strings it writes.
This in itself might just be unfavorable design and not a bug, but the writelog driver in WriteLog::WriteCamera assumes this string to be null-terminated. This leads to writelog writing strings for images that are too long (appending junk until a \0 is found), which in turn leads to ReadLog failing the assertion in ReadLog::ParseCamera:1530 once such a corrupted logfile is replayed.
The only other usage of EncodeHex seems to be in WriteLog::WriteRFID, where the whole string is properly set to \0 before calling EncodeHex.
patch EncodeHex to null-terminate its strings
The changes have been made in SVN trunk.
Thank you for your contribution.