aboutsummaryrefslogtreecommitdiff
path: root/libio/bits
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2024-08-05 10:55:51 +0200
committerAndreas Schwab <schwab@suse.de>2024-08-05 16:49:58 +0200
commit39ca997ab378990d5ac1aadbaa52aaf1db6d526f (patch)
tree09d025937fc8aa6345cfa0041c059cda9718579a /libio/bits
parent1b0a2062c8938c7333cd118d85d9976c4e7c92af (diff)
downloadglibc-39ca997ab378990d5ac1aadbaa52aaf1db6d526f.zip
glibc-39ca997ab378990d5ac1aadbaa52aaf1db6d526f.tar.gz
glibc-39ca997ab378990d5ac1aadbaa52aaf1db6d526f.tar.bz2
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")
Diffstat (limited to 'libio/bits')
-rw-r--r--libio/bits/stdio2.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/libio/bits/stdio2.h b/libio/bits/stdio2.h
index 91a80dd..4b8bc35 100644
--- a/libio/bits/stdio2.h
+++ b/libio/bits/stdio2.h
@@ -308,14 +308,14 @@ fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
"fgets called with bigger size than length of "
"destination buffer")
{
- size_t sz = __glibc_objsize (__s);
- if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
+ size_t __sz = __glibc_objsize (__s);
+ if (__glibc_safe_or_unknown_len (__n, sizeof (char), __sz))
return __fgets_alias (__s, __n, __stream);
#if !__fortify_use_clang
- if (__glibc_unsafe_len (__n, sizeof (char), sz))
- return __fgets_chk_warn (__s, sz, __n, __stream);
+ if (__glibc_unsafe_len (__n, sizeof (char), __sz))
+ return __fgets_chk_warn (__s, __sz, __n, __stream);
#endif
- return __fgets_chk (__s, sz, __n, __stream);
+ return __fgets_chk (__s, __sz, __n, __stream);
}
__fortify_function __wur __nonnull ((4)) __attribute_overloadable__ size_t
@@ -326,14 +326,14 @@ fread (__fortify_clang_overload_arg (void *, __restrict, __ptr),
"fread called with bigger size * n than length "
"of destination buffer")
{
- size_t sz = __glibc_objsize0 (__ptr);
- if (__glibc_safe_or_unknown_len (__n, __size, sz))
+ size_t __sz = __glibc_objsize0 (__ptr);
+ if (__glibc_safe_or_unknown_len (__n, __size, __sz))
return __fread_alias (__ptr, __size, __n, __stream);
#if !__fortify_use_clang
- if (__glibc_unsafe_len (__n, __size, sz))
- return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
+ if (__glibc_unsafe_len (__n, __size, __sz))
+ return __fread_chk_warn (__ptr, __sz, __size, __n, __stream);
#endif
- return __fread_chk (__ptr, sz, __size, __n, __stream);
+ return __fread_chk (__ptr, __sz, __size, __n, __stream);
}
#ifdef __USE_GNU
@@ -345,14 +345,14 @@ fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
"fgets called with bigger size than length of "
"destination buffer")
{
- size_t sz = __glibc_objsize (__s);
- if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
+ size_t __sz = __glibc_objsize (__s);
+ if (__glibc_safe_or_unknown_len (__n, sizeof (char), __sz))
return __fgets_unlocked_alias (__s, __n, __stream);
#if !__fortify_use_clang
- if (__glibc_unsafe_len (__n, sizeof (char), sz))
- return __fgets_unlocked_chk_warn (__s, sz, __n, __stream);
+ if (__glibc_unsafe_len (__n, sizeof (char), __sz))
+ return __fgets_unlocked_chk_warn (__s, __sz, __n, __stream);
#endif
- return __fgets_unlocked_chk (__s, sz, __n, __stream);
+ return __fgets_unlocked_chk (__s, __sz, __n, __stream);
}
#endif
@@ -366,8 +366,8 @@ fread_unlocked (__fortify_clang_overload_arg0 (void *, __restrict, __ptr),
"fread_unlocked called with bigger size * n than "
"length of destination buffer")
{
- size_t sz = __glibc_objsize0 (__ptr);
- if (__glibc_safe_or_unknown_len (__n, __size, sz))
+ size_t __sz = __glibc_objsize0 (__ptr);
+ if (__glibc_safe_or_unknown_len (__n, __size, __sz))
{
# ifdef __USE_EXTERN_INLINES
if (__builtin_constant_p (__size)
@@ -393,10 +393,10 @@ fread_unlocked (__fortify_clang_overload_arg0 (void *, __restrict, __ptr),
return __fread_unlocked_alias (__ptr, __size, __n, __stream);
}
# if !__fortify_use_clang
- if (__glibc_unsafe_len (__n, __size, sz))
- return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
+ if (__glibc_unsafe_len (__n, __size, __sz))
+ return __fread_unlocked_chk_warn (__ptr, __sz, __size, __n, __stream);
# endif
- return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
+ return __fread_unlocked_chk (__ptr, __sz, __size, __n, __stream);
}
#endif