summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-09 11:53:30 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-09 11:53:30 (GMT)
commitd2dee34a851eb6b10adb586861aeb66752e364c5 (patch)
treeacfea14e6e48670df34b5e648556b5dd39869f0d
parent33cb5c9017df9f0aeb52b90cc8cd7ee37dd5f136 (diff)
parent35db8a80c19aef7418ed4e1572b962cba6577625 (diff)
downloadcpython-d2dee34a851eb6b10adb586861aeb66752e364c5.zip
cpython-d2dee34a851eb6b10adb586861aeb66752e364c5.tar.gz
cpython-d2dee34a851eb6b10adb586861aeb66752e364c5.tar.bz2
Merge fix for issue #11450
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/getbuildinfo.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 9d6ed3a..dc4f63e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
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 #11335: Fixed a memory leak in list.sort when the key function
throws an exception.
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index a4d839e..f07b5f8 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -34,7 +34,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();