diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-09 12:54:00 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-09 12:54:00 +0100 |
commit | 2ddaaff62d666b8994deb9dc11ab2cd8a6c2217a (patch) | |
tree | 9a4f0def78ea1e0284fd1e1480ff7590dfd1ae48 | |
parent | 9d4836e7319c2d32a2cec68a815858db4d5cbd04 (diff) | |
download | cpython-git-2ddaaff62d666b8994deb9dc11ab2cd8a6c2217a.tar.gz |
Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
there are many tags (e.g. when using mq). Patch by Nadeem Vawda.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/getbuildinfo.c | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -9,6 +9,9 @@ What's New in Python 2.7.2? Core and Builtins ----------------- +- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when + there are many tags (e.g. when using mq). Patch by Nadeem Vawda. + - Issue #10451: memoryview objects could allow to mutate a readable buffer. Initial patch by Ross Lagerwall. diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index c70126d584..ac5188126c 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -42,7 +42,9 @@ const char * Py_GetBuildInfo(void) { - static char buildinfo[50]; + static char buildinfo[50 + sizeof HGVERSION + + ((sizeof HGTAG > sizeof HGBRANCH) ? + sizeof HGTAG : sizeof HGBRANCH)]; const char *revision = _Py_hgversion(); const char *sep = *revision ? ":" : ""; const char *hgid = _Py_hgidentifier(); |