2
0
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:
Rose
2024-08-13 11:24:45 -04:00
committed by Todd C. Miller
parent 7269ee2be8
commit e7483ae8e9
2 changed files with 3 additions and 3 deletions

View File

@@ -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 */

View File

@@ -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;
}