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

sudo_uuid_to_string_v1's first argument should be const #389

Merged
merged 1 commit into from
Aug 12, 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 @@ -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
Loading