summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygheap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 2c937fc7c..3b4b72ba7 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -163,8 +163,10 @@ cygheap_init ()
if (!cygheap->sigs)
sigalloc ();
+ /* Should this ever change, keep in mind that shared_prefix_buf is exactly
+ 8 bytes long, just enough to match the size of the "Global\\" string. */
if (!cygheap->shared_prefix)
- cygheap->shared_prefix = cstrdup (
+ strcpy (cygheap->shared_prefix = cygheap->shared_prefix_buf,
wincap.has_terminal_services () ? "Global\\" : "");
}