Index: _msi.c =================================================================== --- _msi.c (revision 57972) +++ _msi.c (working copy) @@ -488,7 +536,7 @@ FILETIME fval; char sbuf[1000]; char *sval = sbuf; - DWORD ssize = sizeof(sval); + DWORD ssize = sizeof(sbuf); if (!PyArg_ParseTuple(args, "i:GetProperty", &field)) return NULL; @@ -496,7 +544,8 @@ status = MsiSummaryInfoGetProperty(si->h, field, &type, &ival, &fval, sval, &ssize); if (status == ERROR_MORE_DATA) { - sval = malloc(ssize); + ssize++; + sval = malloc(ssize); status = MsiSummaryInfoGetProperty(si->h, field, &type, &ival, &fval, sval, &ssize); } @@ -508,7 +557,7 @@ PyErr_SetString(PyExc_NotImplementedError, "FILETIME result"); return NULL; case VT_LPSTR: - result = PyString_FromStringAndSize(sval, ssize); + result = PyString_FromString(sval); if (sval != sbuf) free(sval); return result;