Skip to content

Commit

Permalink
Devskim happyness
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdope committed Jul 4, 2024
1 parent 17474b2 commit 3c37396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ int pusb_local_login(t_pusb_options *opts, const char *user, const char *service
int local_request = 0;

char *xrdpSession = getenv("XRDP_SESSION");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
if (xrdpSession == NULL || strcmp(xrdpSession, "\0")) {
if (xrdpSession == NULL || strncmp(xrdpSession, "\0", 1)) {
log_error("XRDP session detected, denying.\n");
return (0);
}
Expand Down

0 comments on commit 3c37396

Please sign in to comment.