Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Vasil Kolev (krokodilerian)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in db_postgres and BLOB handling+patch
After digging more in the db_postgres driver and problems with XML with appended characters, I looked into PGunescape (which is used on BLOB fields) and turns out it doesn't add NULL termination on the strings. It wouldn't be a problem if some other code didnt't rely on strlen() of such fields...
The NULL termination will always work, as PGunescape allocates one more byte for the field (to work around malloc(0)/realloc(0)).