The following issues were found
plugins/sndio/sndio.c
1 issues
Line: 19
*/
#include <obs-module.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("sndio", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "sndio output capture";
}
Reported by Cppcheck.
plugins/text-freetype2/find-font-iconv.c
1 issues
Line: 99
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
const char *charset = get_code_page_for_font(sfnt_name->platform_id,
sfnt_name->encoding_id,
sfnt_name->language_id);
char utf8[256];
char *conv_in, *conv_out;
size_t in_len, out_len;
if (!charset) {
blog(LOG_DEBUG,
Reported by FlawFinder.
plugins/vlc-video/vlc-video-source.c
1 issues
Line: 449
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
c->audio_capacity = count;
}
memcpy((void *)c->audio.data[0], samples, size);
c->audio.timestamp = (uint64_t)pts * 1000ULL - time_start;
c->audio.frames = count;
obs_source_output_audio(c->source, &c->audio);
}
Reported by FlawFinder.
plugins/win-capture/graphics-hook/gl-decs.h
1 issues
Line: 98
Column: 65
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
typedef void(WINAPI *GLDELETETEXTURESPROC)(GLsizei n, const GLuint *buffers);
typedef void(WINAPI *GLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers);
typedef void(WINAPI *GLGENTEXTURESPROC)(GLsizei n, GLuint *textures);
typedef GLvoid *(WINAPI *GLMAPBUFFERPROC)(GLenum target, GLenum access);
typedef GLboolean(WINAPI *GLUNMAPBUFFERPROC)(GLenum target);
typedef void(WINAPI *GLBINDBUFFERPROC)(GLenum target, GLuint buffer);
typedef void(WINAPI *GLBINDTEXTUREPROC)(GLenum target, GLuint texture);
typedef void(WINAPI *GLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *buffers);
typedef void(WINAPI *GLDELETEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers);
Reported by FlawFinder.
plugins/win-capture/graphics-hook/vulkan-capture.h
1 issues
Line: 854
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
#include <stdio.h>
#define debug(format, ...) \
do { \
char str[256]; \
snprintf(str, sizeof(str) - 1, "%s " format "\n", \
"[OBS graphics-hook]", ##__VA_ARGS__); \
OutputDebugStringA(str); \
} while (false)
Reported by FlawFinder.
plugins/win-capture/inject-helper/inject-helper.c
1 issues
Line: 99
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
int main(int argc, char *argv_ansi[])
{
wchar_t dll_path[MAX_PATH];
LPWSTR pCommandLineW;
LPWSTR *argv;
int ret = INJECT_ERROR_INVALID_PARAMS;
SetErrorMode(SEM_FAILCRITICALERRORS);
Reported by FlawFinder.
plugins/win-capture/inject-library.c
1 issues
Line: 53
Column: 10
CWE codes:
126
/* -------------------------------- */
size = (wcslen(dll) + 1) * sizeof(wchar_t);
mem = virtual_alloc_ex(process, NULL, size, MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE);
if (!mem) {
goto fail;
}
Reported by FlawFinder.
plugins/win-capture/plugin-main.c
1 issues
Line: 6
#include <util/windows/win-version.h>
#include <util/platform.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("win-capture", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "Windows game/screen/window capture";
}
Reported by Cppcheck.
plugins/win-dshow/ffmpeg-decode.c
1 issues
Line: 216
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
memset(decode->packet_buffer + size, 0, INPUT_BUFFER_PADDING_SIZE);
memcpy(decode->packet_buffer, data, size);
}
bool ffmpeg_decode_audio(struct ffmpeg_decode *decode, uint8_t *data,
size_t size, struct obs_source_audio *audio,
bool *got_output)
Reported by FlawFinder.
plugins/win-dshow/virtualcam-module/placeholder.cpp
1 issues
Line: 88
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
{
Status s;
wchar_t file[MAX_PATH];
if (!GetModuleFileNameW(dll_inst, file, MAX_PATH)) {
return false;
}
wchar_t *slash = wcsrchr(file, '\\');
Reported by FlawFinder.