Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict-qualify sudo_hexchar_v1 #399

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/sudo_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ sudo_dso_public int sudo_getgrouplist2_v1(const char *name, gid_t basegid, GETGR
#define sudo_getgrouplist2(_a, _b, _c, _d) sudo_getgrouplist2_v1((_a), (_b), (_c), (_d))

/* hexchar.c */
sudo_dso_public int sudo_hexchar_v1(const char *s);
sudo_dso_public int sudo_hexchar_v1(const char s[restrict static 2]);
#define sudo_hexchar(_a) sudo_hexchar_v1(_a)

/* key_val.c */
Expand Down
2 changes: 1 addition & 1 deletion lib/util/hexchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Returns a value 0-255 on success or -1 for invalid input.
*/
int
sudo_hexchar_v1(const char *s)
sudo_hexchar_v1(const char s[restrict static 2])
{
unsigned char result[2];
unsigned int i;
Expand Down
Loading