Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for SLE-Module-Server-Applications:s390x
SUSE:SLE-15:Update
cups-filters.29065
cups-filters-1.20.3-0003-beh-backend-Further-im...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cups-filters-1.20.3-0003-beh-backend-Further-improvements-CVE-2023-24805.patch of Package cups-filters.29065
--- backend/beh.c.patched-0002-beh-backend-Extra-checks-against-odd-forged-input-CVE-2023-24805 2023-05-16 10:24:59.289837221 +0200 +++ backend/beh.c 2023-05-16 10:27:30.244092885 +0200 @@ -28,7 +28,7 @@ * Local globals... */ -static int job_canceled = 0; /* Set to 1 on SIGTERM */ +static volatile int job_canceled = 0; /* Set to 1 on SIGTERM */ /* * Local functions... @@ -229,9 +229,7 @@ call_backend(char *uri, */ scheme[0] = '\0'; - strncpy(scheme, uri, sizeof(scheme)); - if (strlen(uri) > sizeof(scheme) - 1) - scheme[sizeof(scheme) - 1] = '\0'; + strncat(scheme, uri, sizeof(scheme) - 1); if ((ptr = strchr(scheme, ':')) != NULL) *ptr = '\0'; else @@ -246,7 +244,13 @@ call_backend(char *uri, "ERROR: beh: Invalid URI, scheme contains a slash ('/').\n"); exit (CUPS_BACKEND_FAILED); } - + if (!strcmp(scheme, ".") || !strcmp(scheme, "..")) + { + fprintf(stderr, + "ERROR: beh: Invalid URI, scheme (\"%s\") is a directory.\n", + scheme); + exit (CUPS_BACKEND_FAILED); + } if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL) cups_serverbin = CUPS_SERVERBIN; @@ -330,8 +334,10 @@ static void sigterm_handler(int sig) { /* I - Signal number (unused) */ (void)sig; - fprintf(stderr, - "DEBUG: beh: Job canceled.\n"); + const char * const msg = "DEBUG: beh: Job canceled.\n"; + // The if() is to eliminate the return value and silence the warning + // about an unused return value. + if (write(2, msg, strlen(msg))); if (job_canceled) _exit(CUPS_BACKEND_OK);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor