The following issues were found
UI/window-basic-auto-config.cpp
1 issues
Line: 40
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static OBSData OpenServiceSettings(std::string &type)
{
char serviceJsonPath[512];
int ret = GetProfilePath(serviceJsonPath, sizeof(serviceJsonPath),
SERVICE_PATH);
if (ret <= 0)
return OBSData();
Reported by FlawFinder.
UI/window-basic-main-browser.cpp
1 issues
Line: 44
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
uint64_t id = dist(e2);
char id_str[20];
snprintf(id_str, sizeof(id_str), "%16llX", (unsigned long long)id);
return std::string(id_str);
}
void CheckExistingCookieId()
Reported by FlawFinder.
UI/window-basic-main-screenshot.cpp
1 issues
Line: 116
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (gs_stagesurface_map(stagesurf, &videoData, &videoLinesize)) {
int linesize = image.bytesPerLine();
for (int y = 0; y < (int)cy; y++)
memcpy(image.scanLine(y),
videoData + (y * videoLinesize), linesize);
gs_stagesurface_unmap(stagesurf);
}
}
Reported by FlawFinder.
UI/window-importer.cpp
1 issues
Line: 558
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
{
setEnabled(false);
char dst[512];
GetConfigPath(dst, 512, "obs-studio/basic/scenes/");
for (int i = 0; i < optionsModel->rowCount() - 1; i++) {
int selected = optionsModel->index(i, ImporterColumn::Selected)
.data(Qt::CheckStateRole)
Reported by FlawFinder.
deps/file-updater/file-updater/file-updater.c
1 issues
Line: 15
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
blog(LOG_WARNING, "%s" msg, info->log_prefix, ##__VA_ARGS__)
struct update_info {
char error[CURL_ERROR_SIZE];
struct curl_slist *header;
DARRAY(uint8_t) file_data;
char *user_agent;
CURL *curl;
char *url;
Reported by FlawFinder.
deps/glad/include/glad/glad_egl.h
1 issues
Line: 317
Column: 71
CWE codes:
120
20
EGLint eglGetError(void);
__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname);
EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
const char *eglQueryString(EGLDisplay dpy, EGLint name);
EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
EGLBoolean eglTerminate(EGLDisplay dpy);
Reported by FlawFinder.
deps/glad/src/glad.c
1 issues
Line: 135
Column: 32
CWE codes:
126
return 0;
}
terminator = loc + strlen(ext);
if((loc == extensions || *(loc - 1) == ' ') &&
(*terminator == ' ' || *terminator == '\0')) {
return 1;
}
extensions = terminator;
Reported by FlawFinder.
deps/glad/src/glad_glx.c
1 issues
Line: 133
Column: 28
CWE codes:
126
if(loc == NULL)
break;
terminator = loc + strlen(ext);
if((loc == extensions || *(loc - 1) == ' ') &&
(*terminator == ' ' || *terminator == '\0'))
{
return 1;
}
Reported by FlawFinder.
deps/glad/src/glad_wgl.c
1 issues
Line: 135
Column: 28
CWE codes:
126
if(loc == NULL)
break;
terminator = loc + strlen(ext);
if((loc == extensions || *(loc - 1) == ' ') &&
(*terminator == ' ' || *terminator == '\0'))
{
return 1;
}
Reported by FlawFinder.
deps/jansson/examples/simple_parse.c
1 issues
Line: 183
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
#define MAX_CHARS 4096
int main(int argc, char *argv[]) {
char line[MAX_CHARS];
if (argc != 1) {
fprintf(stderr, "Usage: %s\n", argv[0]);
exit(-1);
}
Reported by FlawFinder.