The following issues were found

libobs-d3d11/d3d11-shaderprocessor.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 163 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	  changed(false)
{
	defaultValue.resize(var.default_val.num);
	memcpy(defaultValue.data(), var.default_val.array, var.default_val.num);

	if (type == GS_SHADER_PARAM_TEXTURE)
		texCounter++;
	else
		textureID = 0;

            

Reported by FlawFinder.

libobs-d3d11/d3d11-texture2d.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 67 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		this->data[i].resize(texSize);

		vector<uint8_t> &subData = this->data[i];
		memcpy(&subData[0], data[i], texSize);

		if (w > 1)
			w /= 2;
		if (h > 1)
			h /= 2;

            

Reported by FlawFinder.

libobs-d3d11/d3d11-texture3d.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 62 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		this->data[i].resize(texSize);

		vector<uint8_t> &subData = this->data[i];
		memcpy(&subData[0], data[i], texSize);

		if (w > 1)
			w /= 2;
		if (h > 1)
			h /= 2;

            

Reported by FlawFinder.

libobs-d3d11/d3d11-vertexbuffer.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 47 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              					     0, &msr)))
		throw HRError("Failed to map buffer", hr);

	memcpy(msr.pData, array, elementSize * vbd.data->num);
	device->context->Unmap(buffer, 0);
}

UINT gs_vertex_buffer::MakeBufferList(gs_vertex_shader *shader,
				      ID3D11Buffer **buffers, uint32_t *strides)

            

Reported by FlawFinder.

libobs-opengl/gl-helpers.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 161 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              			       GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
	success = gl_success("glMapBufferRange");
	if (success && ptr) {
		memcpy(ptr, data, size);
		glUnmapBuffer(target);
	}

	gl_bind_buffer(target, 0);
	return success;

            

Reported by FlawFinder.

libobs-opengl/gl-shaderparser.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 97 Column: 35 CWE codes: 126

              static inline void gl_write_type(struct gl_shader_parser *glsp,
				 const char *type)
{
	if (!gl_write_type_n(glsp, type, strlen(type)))
		dstr_cat(&glsp->gl_string, type);
}

static inline bool gl_write_type_token(struct gl_shader_parser *glsp,
				       struct cf_token *token)

            

Reported by FlawFinder.

libobs-opengl/gl-subsystem.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 1430 Column: 59 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

              	da_pop_back(device->proj_stack);
}

void device_debug_marker_begin(gs_device_t *device, const char *markername,
			       const float color[4])
{
	UNUSED_PARAMETER(device);
	UNUSED_PARAMETER(color);


            

Reported by FlawFinder.

libobs-opengl/gl-wayland-egl.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 155 Column: 22 CWE codes: 126

              static bool extension_supported(const char *extensions, const char *search)
{
	const char *result = strstr(extensions, search);
	unsigned long len = strlen(search);
	return result != NULL &&
	       (result == extensions || *(result - 1) == ' ') &&
	       (result[len] == ' ' || result[len] == '\0');
}


            

Reported by FlawFinder.

libobs/audio-monitoring/osx/coreaudio-output.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 196 Column: 30 CWE codes: 126

              
	if (strcmp(uid, "default") != 0) {
		CFStringRef cf_uid = CFStringCreateWithBytes(
			NULL, (const UInt8 *)uid, strlen(uid),
			kCFStringEncodingUTF8, false);

		stat = AudioQueueSetProperty(monitor->queue,
					     kAudioQueueProperty_CurrentDevice,
					     &cf_uid, sizeof(cf_uid));

            

Reported by FlawFinder.

libobs/callback/calldata.h
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 202 Column: 38 CWE codes: 126

              				       const char *str)
{
	if (str)
		calldata_set_data(data, name, str, strlen(str) + 1);
	else
		calldata_set_data(data, name, NULL, 0);
}

#ifdef __cplusplus

            

Reported by FlawFinder.