From: Rainer Orth Date: Mon, 31 Aug 2015 11:19:42 +0000 (+0000) Subject: Avoid strndup in gcc.c (PR bootstrap/67363) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c25eec8ffd8605d473192faec7ef11b9abf7a10b;p=gcc.git Avoid strndup in gcc.c (PR bootstrap/67363) PR bootstrap/67363 * gcc.c (env_manager::xput): Replace strndup by xstrndup. From-SVN: r227337 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a0123b12ad6..88ccb221be0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-31 Rainer Orth + + PR bootstrap/67363 + * gcc.c (env_manager::xput): Replace strndup by xstrndup. + 2015-08-31 Tom de Vries * tree-ssa-loop-manip.c (find_uses_to_rename_use) diff --git a/gcc/gcc.c b/gcc/gcc.c index 86c24192aab..757bfc988eb 100644 --- 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);