The following issues were found

plugins/decklink/plugin-main.cpp
1 issues
There is an unknown macro here somewhere. Configuration is required. If OBS_DECLARE_MODULE is a macro then please configure it.
Error

Line: 4

              #include <obs-module.h>
#include "decklink-devices.hpp"

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("decklink", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "Blackmagic DeckLink source";
}

            

Reported by Cppcheck.

plugins/decklink/win/platform.cpp
1 issues
wcslen - 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: 38 Column: 15 CWE codes: 126

              	if (input == nullptr)
		return false;

	size_t len = wcslen(input);
	size_t utf8_len = os_wcs_to_utf8(input, len, nullptr, 0);

	output.resize(utf8_len);
	os_wcs_to_utf8(input, len, &output[0], utf8_len);


            

Reported by FlawFinder.

plugins/image-source/image-source.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If OBS_DECLARE_MODULE is a macro then please configure it.
Error

Line: 328

              	.icon_type = OBS_ICON_TYPE_IMAGE,
};

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("image-source", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "Image/color/slideshow sources";
}

            

Reported by Cppcheck.

plugins/linux-alsa/linux-alsa.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If OBS_DECLARE_MODULE is a macro then please configure it.
Error

Line: 19

              */
#include <obs-module.h>

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("linux-alsa", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "Linux ALSA audio input capture";
}

            

Reported by Cppcheck.

UI/api-interface.cpp
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 243 Column: 3 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

              
	char *obs_frontend_get_current_profile_path(void) override
	{
		char profilePath[512];
		int ret = GetProfilePath(profilePath, sizeof(profilePath), "");
		if (ret <= 0)
			return nullptr;

		return bstrdup(profilePath);

            

Reported by FlawFinder.

plugins/linux-capture/xcompcap-helper.cpp
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 339 Column: 8 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 bool *curErrorTarget = 0;
static char curErrorText[200];
static int xerrorlock_handler(Display *disp, XErrorEvent *err)
{

	if (curErrorTarget)
		*curErrorTarget = true;

            

Reported by FlawFinder.

plugins/linux-capture/xcompcap-main.cpp
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: 226 Column: 20 CWE codes: 126

              
	size_t firstMark = wstr.find(WIN_STRING_DIV);
	size_t lastMark = wstr.rfind(WIN_STRING_DIV);
	size_t markSize = strlen(WIN_STRING_DIV);

	// wstr only consists of the window-id
	if (firstMark == std::string::npos)
		return (Window)std::stol(wstr);


            

Reported by FlawFinder.

plugins/linux-jack/jack-wrapper.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 125 Column: 3 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

              	data->jack_ports =
		(jack_port_t **)bzalloc(sizeof(jack_port_t *) * data->channels);
	for (unsigned int i = 0; i < data->channels; ++i) {
		char port_name[10] = {'\0'};
		snprintf(port_name, sizeof(port_name), "in_%u", i + 1);

		data->jack_ports[i] = jack_port_register(
			data->jack_client, port_name, JACK_DEFAULT_AUDIO_TYPE,
			JackPortIsInput | JackPortIsTerminal, 0);

            

Reported by FlawFinder.

plugins/linux-jack/linux-jack.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If OBS_DECLARE_MODULE is a macro then please configure it.
Error

Line: 19

              */
#include <obs-module.h>

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("linux-jack", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "JACK Audio Connection Kit output capture";
}

            

Reported by Cppcheck.

plugins/linux-pulseaudio/linux-pulseaudio.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If OBS_DECLARE_MODULE is a macro then please configure it.
Error

Line: 19

              */
#include <obs-module.h>

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("linux-pulseaudio", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "Linux PulseAudio input/output capture";
}

            

Reported by Cppcheck.