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

Fix sign conversion warnings #337

Merged
merged 2 commits into from
Jan 28, 2025
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 expand.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ char *expand_variables(const char *str, const char *user) {
buf_write(&head, &size, value, strlen(value)) != 0) {
goto fail;
}
} else if (buf_write_byte(&head, &size, *str) != 0) {
} else if (buf_write_byte(&head, &size, (uint8_t) *str) != 0) {
goto fail;
}
}
Expand Down
7 changes: 6 additions & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,12 @@ int get_devices_from_authfile(const cfg_t *cfg, const char *username,
#endif
}

opwfile_size = st.st_size;
if (st.st_size < 0) {
debug_dbg(cfg, "Invalid stat size for %s: %jd", cfg->auth_file,
(intmax_t) st.st_size);
goto err;
}
opwfile_size = (size_t) st.st_size;

gpu_ret = getpwuid_r(st.st_uid, &pw_s, buffer, sizeof(buffer), &pw);
if (gpu_ret != 0 || pw == NULL) {
Expand Down
Loading