mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Restrict-qualify stat_multiarch
This commit is contained in:
@@ -242,7 +242,7 @@ sudo_dso_public int sudo_mmap_protect_v1(void *ptr);
|
||||
#define sudo_mmap_protect(_a) sudo_mmap_protect_v1(_a)
|
||||
|
||||
/* multiarch.c */
|
||||
sudo_dso_public char *sudo_stat_multiarch_v1(const char *path, struct stat *sb);
|
||||
sudo_dso_public char *sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb);
|
||||
#define sudo_stat_multiarch(_a, _b) sudo_stat_multiarch_v1((_a), (_b))
|
||||
|
||||
/* parseln.c */
|
||||
|
@@ -44,7 +44,7 @@
|
||||
* Returns a dynamically allocated string on success and NULL on failure.
|
||||
*/
|
||||
char *
|
||||
sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
||||
sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb)
|
||||
{
|
||||
# if defined(__ILP32__)
|
||||
const char *libdirs[] = { "/libx32/", "/lib/", "/libexec/", NULL };
|
||||
@@ -96,7 +96,7 @@ sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
||||
}
|
||||
#else
|
||||
char *
|
||||
sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
||||
sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user