about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2024-08-05 10:55:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-08-06 08:46:39 +0200
commit6e642a47fa483f1f571a7ca68d8f6517b259cd21 (patch)
tree8aea8168482137250532faabd4c94c8661d30997 /stdlib
parentaca9c7d5de8c4458ff35d32ca491c698d076a1f1 (diff)
downloadglibc-6e642a47fa483f1f571a7ca68d8f6517b259cd21.tar.gz
glibc-6e642a47fa483f1f571a7ca68d8f6517b259cd21.tar.xz
glibc-6e642a47fa483f1f571a7ca68d8f6517b259cd21.zip
Fix name space violation in fortify wrappers (bug 32052)
Rename the identifier sz to __sz everywhere.

Fixes: a643f60c53 ("Make sure that the fortified function conditionals are constant")
(cherry picked from commit 39ca997ab378990d5ac1aadbaa52aaf1db6d526f)
(redone from scratch because of many conflicts)
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/bits/stdlib.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/bits/stdlib.h b/stdlib/bits/stdlib.h
index c6c0082ad5..ef33180f10 100644
--- a/stdlib/bits/stdlib.h
+++ b/stdlib/bits/stdlib.h
@@ -36,16 +36,16 @@ extern char *__REDIRECT_NTH (__realpath_chk_warn,
 __fortify_function __wur char *
 __NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
 {
-  size_t sz = __glibc_objsize (__resolved);
+  size_t __sz = __glibc_objsize (__resolved);
 
-  if (sz == (size_t) -1)
+  if (__sz == (size_t) -1)
     return __realpath_alias (__name, __resolved);
 
 #if defined _LIBC_LIMITS_H_ && defined PATH_MAX
-  if (__glibc_unsafe_len (PATH_MAX, sizeof (char), sz))
-    return __realpath_chk_warn (__name, __resolved, sz);
+  if (__glibc_unsafe_len (PATH_MAX, sizeof (char), __sz))
+    return __realpath_chk_warn (__name, __resolved, __sz);
 #endif
-  return __realpath_chk (__name, __resolved, sz);
+  return __realpath_chk (__name, __resolved, __sz);
 }