The following issues were found

plugins/win-dshow/win-dshow-encoder.cpp
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 225 Column: 11 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

              				 struct encoder_packet *packet,
				 bool *received_packet)
{
	unsigned char *frame_data[DSHOW_MAX_PLANES] = {};
	size_t frame_sizes[DSHOW_MAX_PLANES] = {};
	EncoderPacket dshowPacket;
	bool new_packet = false;

	/* The encoders expect YV12, so swap the chroma planes for encoding */

            

Reported by FlawFinder.

plugins/win-dshow/win-dshow.cpp
1 issues
InitializeCriticalSection - Exceptions can be thrown in low-memory situations
Security

Line: 143 Column: 29 CWE codes:
Suggestion: Use InitializeCriticalSectionAndSpinCount instead

              	CRITICAL_SECTION mutex;

public:
	inline CriticalSection() { InitializeCriticalSection(&mutex); }
	inline ~CriticalSection() { DeleteCriticalSection(&mutex); }

	inline operator CRITICAL_SECTION *() { return &mutex; }
};


            

Reported by FlawFinder.

plugins/win-mf/mf-aac-encoder.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	HRC(CreateEmptySample(sample, buffer, data_length));

	HRC(buffer->Lock(&bufferData, NULL, NULL));
	memcpy(bufferData, data, data_length);
	HRC(buffer->Unlock());
	HRC(buffer->SetCurrentLength(data_length));

	samples = data_length / channels / (bitsPerSample / 8);
	sampleDur = (UINT64)(((float) sampleRate / channels / samples) * 10000);

            

Reported by FlawFinder.

plugins/win-mf/mf-h264.cpp
1 issues
failed to expand 'MFP_USE_BUF_SIZE', Invalid ## usage when expanding 'MFP'.
Error

Line: 60

              #define TEXT_VBR             MFTEXT("VBR")
#define TEXT_CQP             MFTEXT("CQP")

#define MFP(x) "mf_h264_" ## x
#define MFP_USE_ADVANCED     MFP("use_advanced")
#define MFP_USE_LOWLAT       MFP("use_low_latency")
#define MFP_B_FRAMES         MFP("b_frames")
#define MFP_BITRATE          MFP("bitrate")
#define MFP_USE_BUF_SIZE     MFP("use_buf_size")

            

Reported by Cppcheck.

plugins/win-wasapi/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: 3

              #include <obs-module.h>

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("win-wasapi", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
	return "Windows WASAPI audio input/output sources";
}


            

Reported by Cppcheck.

plugins/win-wasapi/win-wasapi.cpp
1 issues
There is an unknown macro here somewhere. Configuration is required. If STDMETHODIMP_ is a macro then please configure it.
Error

Line: 94

              public:
	WASAPINotify(WASAPISource *source_) : source(source_) {}

	STDMETHODIMP_(ULONG) AddRef()
	{
		return (ULONG)os_atomic_inc_long(&refs);
	}

	STDMETHODIMP_(ULONG) STDMETHODCALLTYPE Release()

            

Reported by Cppcheck.

test/test-input/test-input.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: 3

              #include <obs-module.h>

OBS_DECLARE_MODULE()

extern struct obs_source_info test_random;
extern struct obs_source_info test_sinewave;
extern struct obs_source_info test_filter;
extern struct obs_source_info async_sync_test;
extern struct obs_source_info buffering_async_sync_test;

            

Reported by Cppcheck.