summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-09 11:34:41 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-09 11:34:41 (GMT)
commit7983d33f543685564ba6b900e162a9aaadb2ea82 (patch)
tree14f0a168cf8900a8d85e4b8cfcd81d8d8303da62 /Modules
parentd2853180dfd905d07aa07d6f95cc4736d5363f22 (diff)
downloadcpython-7983d33f543685564ba6b900e162a9aaadb2ea82.zip
cpython-7983d33f543685564ba6b900e162a9aaadb2ea82.tar.gz
cpython-7983d33f543685564ba6b900e162a9aaadb2ea82.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/getbuildinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index c70126d..ac51881 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();