Writing VT_LPSTR properties to disk is not always done correctly due to wrong length
Submitted by Marco Martins
Assigned to Stepan Kasal
Created attachment 371466 Proof of issue happening
On method "msole_metadata_write_string" of file gsf-msole-utils.c there's a line where the string length is written to file "GSF_LE_SET_GUINT32(buf, len + 1);" which causes this issue since it must be "GSF_LE_SET_GUINT32(buf, bytes_written + 1);" because "bytes_written" have the correct size after the iconv conversion to codepage CP-1252, which sometimes differ from the original UTF-8 string size.
I attached a zip file which contains two files, one with the original VT_VECTOR | VT_LPSTR stream and the written one that I've extracted from the office file if anyone wants proof of the issue.
Attachment 371466, "Proof of issue happening":