Skip to content

Commit

Permalink
sudo_uuid_to_string_v1's first argument should be const
Browse files Browse the repository at this point in the history
uuid is not modified.
  • Loading branch information
AreaZR committed Aug 12, 2024
1 parent 1381a69 commit f33faa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/sudo_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ sudo_dso_public void sudo_get_ttysize_v2(int fd, int *rowp, int *colp);
/* uuid.c */
sudo_dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]);
#define sudo_uuid_create(_a) sudo_uuid_create_v1((_a))
sudo_dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz);
sudo_dso_public char *sudo_uuid_to_string_v1(const unsigned char uuid[16], char *dst, size_t dstsiz);
#define sudo_uuid_to_string(_a, _b, _c) sudo_uuid_to_string_v1((_a), (_b), (_c))

#endif /* SUDO_UTIL_H */
2 changes: 1 addition & 1 deletion lib/util/uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sudo_uuid_create_v1(unsigned char uuid_out[16])
* Format a uuid as a 36-byte string (plus one for the NUL).
*/
char *
sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz)
sudo_uuid_to_string_v1(const unsigned char uuid[16], char *dst, size_t dstsiz)
{
const char hex[] = "0123456789abcdef";
char *cp = dst;
Expand Down

0 comments on commit f33faa8

Please sign in to comment.