[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-18 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-18 Thread miss-islington


miss-islington  added the comment:


New changeset d5409eb6c26c6bca2686762ce0fd5223bb845e8a by Miss Islington (bot) 
(Tzu-ping Chung) in branch '2.7':
[2.7] bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one 
character (GH-4517) (GH-11749)
https://github.com/python/cpython/commit/d5409eb6c26c6bca2686762ce0fd5223bb845e8a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
pull_requests: +11678, 11679, 11680, 11681
stage: backport needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
pull_requests: +11678, 11679, 11680
stage: backport needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
pull_requests: +11678, 11679
stage: backport needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
pull_requests: +11678
stage: backport needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread miss-islington


miss-islington  added the comment:


New changeset 56f84117a766d21045349f0217ce740831aef0dc by Miss Islington (bot) 
in branch '3.7':
bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one 
character (GH-4517)
https://github.com/python/cpython/commit/56f84117a766d21045349f0217ce740831aef0dc


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Steve Dower


Steve Dower  added the comment:

As expected, the 2.7 backport needs more work.

Leaving this open for anyone who wants to handle it. I'll happily click merge 
for you if CI passes.

--
stage: patch review -> backport needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Steve Dower


Steve Dower  added the comment:


New changeset 2de576e16d42ce43698d384d0dd46ba6cf165424 by Steve Dower (Tzu-ping 
Chung) in branch 'master':
bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one 
character (GH-4517)
https://github.com/python/cpython/commit/2de576e16d42ce43698d384d0dd46ba6cf165424


--
pull_requests: +11645

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-02 Thread Steve Dower


Steve Dower  added the comment:

I resolved some conflicts and will merge this once CI completes.

If the backport to 2.7 isn't automatic then it may wait until someone else 
comes in to do it.

--
assignee: loewis -> steve.dower
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

I made a shot to address the free() call. Hopefully this makes sense.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

I have created a PR #4517 from the patch. Would it be better to track the 
malloc problem in a new issue?

As for why this never caused any problems… msilib is pretty standalone, and not 
one of the most used modules. It is also pretty trivial to roll your own 
solution with ctypes (or any FFI library), which is what I did when I hit this 
bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4454

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-19 Thread Eric V. Smith

Eric V. Smith  added the comment:

Despite the fact that as of now (or 6+ years ago!) the only way to trigger the 
malloc() is via VT_LPSTR, I still think the way the free() call is written is 
bad. What if another type is added?

If that were fixed, I still think the basic idea of this patch in isolation of 
the other raised issues is a good idea. If it was converted to a PR, I'd 
support merging it (although I'd like to hear from the Windows folks).

But it is curious that this bug is so old and it hasn't caused more problems.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-10-07 Thread Tzu-ping Chung

Change by Tzu-ping Chung :


--
nosy: +uranusjr

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2015-05-06 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-05-28 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

Responding to Eric's comments

1. There are only three valid property types returned by MsiInteger, String  
FILETIME. (http://msdn.microsoft.com/en-us/library/aa372045%28v=VS.85%29.aspx)

2. That comment makes sense - I have entered a new issue (issue12202) for that.

3. Per 1. - there shouldn't be any other unhandled types. I have entered issue 
issue12201 to track adding support for FILETIMEs.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-05-02 Thread Eric V. Smith

Eric V. Smith e...@trueblade.com added the comment:

This patch seems okay to me, as far as it goes. I'd like to hear Martin's 
feedback, but I think it should be committed.

And I realize the rest of this message doesn't apply to the patch, but it does 
address other problems in summary_getproperty(). At least one of these led to 
the original problem with the truncated character.

1. It's not clear to me that the malloc() call only occurs if the type is 
VT_LPSTR. But that's the only case where free() is called. I think it would be 
better to move the call to free() to a cleanup section at the end of the 
function.

2. The status is never checked for success, just for one specific failure. I 
think both calls to MsiSummaryInfoGetProperty should be looking for 
ERROR_SUCCESS.

3. I don't think VT_FILETIME is special enough for its own error message. It 
should just be caught with all other unknown types.

Maybe these last 3 should get their own new issue.

--
nosy: +eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-04-03 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

I have updated the patch for current trunk (though no real changes required). I 
also include a testcase.

One thing to review is that I added functionality to the tests to create the 
MSI to be tested. (felt this was safer than touching one of the ones under 
%systemroot%\installer.

--
keywords: +patch
nosy: +markm
Added file: http://bugs.python.org/file21524/issue1104_msi_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-04-03 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

+path, msilib.schema, Ptyhon Tests, product_code, 1.0, PSF)
s/Ptyhon/Python/

--
nosy: +ezio.melotti
stage: test needed - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-04-03 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

And fix the typo... (thanks Ezio)

--
Added file: http://bugs.python.org/file21525/issue1104_msi_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2010-07-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The patch looks correct, it's now a matter of unit tests.
for example, I'd test the case where the length is around 1000..

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2010-07-10 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2009-04-06 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - test needed
type:  - behavior
versions: +Python 2.6, Python 3.0 -Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2007-09-06 Thread Martin v. Löwis

Changes by Martin v. Löwis:


--
assignee:  - loewis
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1104
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2007-09-04 Thread Anthony Tuininga

New submission from 
Anthony Tuininga
:

Attached is a patch that fixes the truncation of the property values
returned by msilib.SummaryInfo.GetProperty(). Unfortunately Microsoft
has deemed it necessary to return the size of the string without the
null termination character but insists upon the size including it when
passing it in. Arggh!

--
components: Library (Lib)
files: _msi.patch2.txt
messages: 55649
nosy: atuining
severity: normal
status: open
title: msilib.SummaryInfo.GetProperty() truncates the string by one character
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1104
__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;
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com