mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 13:58:05 +00:00
Restrict-qualify sudo_hexchar_v1
sudo_hexchar_v1 requires an array of at least size-2, and is not aliased.
This commit is contained in:
parent
827fa8b76d
commit
82eac2b413
@ -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))
|
#define sudo_getgrouplist2(_a, _b, _c, _d) sudo_getgrouplist2_v1((_a), (_b), (_c), (_d))
|
||||||
|
|
||||||
/* hexchar.c */
|
/* 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)
|
#define sudo_hexchar(_a) sudo_hexchar_v1(_a)
|
||||||
|
|
||||||
/* key_val.c */
|
/* key_val.c */
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* Returns a value 0-255 on success or -1 for invalid input.
|
* Returns a value 0-255 on success or -1 for invalid input.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sudo_hexchar_v1(const char *s)
|
sudo_hexchar_v1(const char s[restrict static 2])
|
||||||
{
|
{
|
||||||
unsigned char result[2];
|
unsigned char result[2];
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user