The following issues were found
plugins/obs-qsv11/libmfx/src/mfx_dispatcher.cpp
1 issues
Line: 149
Column: 17
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
int i;
DISPATCHER_LOG_OPERATION({
wchar_t modulePath[1024];
GetModuleFileNameW((HMODULE)hModule, modulePath, sizeof(modulePath)/sizeof(modulePath[0]));
DISPATCHER_LOG_INFO((("loaded module %S\n"), modulePath))
});
if (impl & MFX_IMPL_AUDIO)
Reported by FlawFinder.
plugins/obs-qsv11/libmfx/src/mfx_dxva2_device.cpp
1 issues
Line: 259
Column: 17
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
else
{
DXVA2DEVICE_TRACE_OPERATION({
wchar_t path[1024];
DWORD lastErr = GetLastError();
GetModuleFileNameW(m_hModule, path, sizeof(path)/sizeof(path[0]));
DXVA2DEVICE_TRACE(("FAIL: invoking GetProcAddress(Direct3DCreate9) in %S : GetLastError()==0x%x\n", path, lastErr)); });
return false;
}
Reported by FlawFinder.
plugins/obs-qsv11/obs-qsv11-plugin-main.c
1 issues
Line: 59
#include <obs-module.h>
#include "mfxsession.h"
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("obs-qsv11", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "Intel Quick Sync Video H.264 encoder support for Windows";
}
Reported by Cppcheck.
plugins/obs-qsv11/obs-qsv11.c
1 issues
Line: 617
Column: 2
CWE codes:
Suggestion:
Use InitializeCriticalSectionAndSpinCount instead
static void *obs_qsv_create(obs_data_t *settings, obs_encoder_t *encoder)
{
InitializeCriticalSection(&g_QsvCs);
struct obs_qsv *obsqsv = bzalloc(sizeof(struct obs_qsv));
obsqsv->encoder = encoder;
if (update_settings(obsqsv, settings)) {
Reported by FlawFinder.
plugins/obs-transitions/obs-transitions.c
1 issues
Line: 3
#include <obs-module.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("obs-transitions", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "OBS core transitions";
}
Reported by Cppcheck.
plugins/obs-x264/obs-x264-plugin-main.c
1 issues
Line: 3
#include <obs-module.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("obs-x264", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "x264 based encoder";
}
Reported by Cppcheck.
plugins/oss-audio/oss-audio.c
1 issues
Line: 19
*/
#include <obs-module.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("oss-audio", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "OSS audio input capture";
Reported by Cppcheck.
plugins/rtmp-services/rtmp-custom.c
1 issues
Line: 122
Column: 46
CWE codes:
126
struct rtmp_custom *service = data;
if (service->server != NULL && video_settings != NULL &&
strncmp(service->server, RTMP_PROTOCOL, strlen(RTMP_PROTOCOL)) !=
0) {
obs_data_set_bool(video_settings, "repeat_headers", true);
}
}
Reported by FlawFinder.
plugins/rtmp-services/service-specific/twitch.c
1 issues
Line: 96
Column: 44
CWE codes:
126
cache_old = obs_module_config_path("twitch_ingests.json");
cache_new = obs_module_config_path("twitch_ingests.new.json");
os_quick_write_utf8_file(cache_new, json, strlen(json), false);
os_safe_replace(cache_old, cache_new, NULL);
bfree(cache_old);
bfree(cache_new);
Reported by FlawFinder.
plugins/rtmp-services/service-specific/younow.c
1 issues
Line: 28
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return 0;
}
memcpy(&(mem->memory[mem->size]), contents, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
return realsize;
}
Reported by FlawFinder.