Message ID | ydd4mjf66vn.fsf@lokon.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
# HG changeset patch # Parent 1b9570b3c98bf549aba6dee203d37955e96d744d Avoid strndup in gcc.c (PR bootstrap/67363) diff --git a/gcc/gcc.c b/gcc/gcc.c --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -123,7 +123,7 @@ env_manager::xput (const char *string) gcc_assert (equals); struct kv kv; - kv.m_key = strndup (string, equals - string); + kv.m_key = xstrndup (string, equals - string); const char *cur_value = ::getenv (kv.m_key); if (m_debug) fprintf (stderr, "saving old value: %s\n",cur_value);