The following issues were found
deps/lzma/liblzma/lz/lz_encoder.c
1 issues
Line: 428
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
// If the preset dictionary is bigger than the actual
// dictionary, use only the tail.
mf->write_pos = my_min(lz_options->preset_dict_size, mf->size);
memcpy(mf->buffer, lz_options->preset_dict
+ lz_options->preset_dict_size - mf->write_pos,
mf->write_pos);
mf->action = LZMA_SYNC_FLUSH;
mf->skip(mf, mf->write_pos);
}
Reported by FlawFinder.
deps/lzma/liblzma/lz/lz_encoder.h
1 issues
Line: 289
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
assert(mf->read_ahead == 0);
assert(mf->read_pos >= *left);
memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left,
copy_size);
*out_pos += copy_size;
*left -= copy_size;
return;
Reported by FlawFinder.
deps/lzma/liblzma/rangecoder/price_tablegen.c
1 issues
Line: 69
Column: 3
CWE codes:
134
Suggestion:
Use a constant for the format specification
if (i % 8 == 0)
printf("\n\t");
printf("%4" PRIu32, rc_prices[i]);
if (i != array_size - 1)
printf(",");
}
Reported by FlawFinder.
deps/obs-scripting/obs-scripting-python.h
1 issues
Line: 169
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
static int parse_args_(PyObject *args, const char *func, const char *format,
...)
{
char new_format[128];
va_list va_args;
int ret;
snprintf(new_format, sizeof(new_format), "%s:%s", format, func);
Reported by FlawFinder.
deps/w32-pthreads/autostatic.c
1 issues
Line: 58
Column: 55
CWE codes:
120
20
#if defined(__MINGW64__) || defined(__MINGW32__)
# define attribute_section(a) __attribute__((section(a)))
#elif defined(_MSC_VER)
# define attribute_section(a) __pragma(section(a,long,read)); __declspec(allocate(a))
#endif
attribute_section(".ctors") void *gcc_ctor = on_process_init;
attribute_section(".dtors") void *gcc_dtor = on_process_exit;
Reported by FlawFinder.
deps/w32-pthreads/pthread_attr_getschedparam.c
1 issues
Line: 50
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return EINVAL;
}
memcpy (param, &(*attr)->param, sizeof (*param));
return 0;
}
Reported by FlawFinder.
deps/w32-pthreads/pthread_attr_setschedparam.c
1 issues
Line: 61
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return EINVAL;
}
memcpy (&(*attr)->param, param, sizeof (*param));
return 0;
}
Reported by FlawFinder.
deps/w32-pthreads/tests/benchtest1.c
1 issues
Line: 171
Column: 3
CWE codes:
Suggestion:
Use InitializeCriticalSectionAndSpinCount instead
(float) durationMilliSecs * 1E3 / ITERATIONS);
InitializeCriticalSection(&cs);
TESTSTART
assert((EnterCriticalSection(&cs), 1) == one);
assert((LeaveCriticalSection(&cs), 2) == two);
TESTSTOP
Reported by FlawFinder.
deps/w32-pthreads/tests/cancel9.c
1 issues
Line: 87
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
SOCKET UDPSocket;
int addr_len;
int nbyte, bytes;
char buffer[4096];
WORD wsaVersion = MAKEWORD (2, 2);
WSADATA wsaData;
pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
Reported by FlawFinder.
deps/w32-pthreads/tests/cleanup0.c
1 issues
Line: 150
Column: 3
CWE codes:
Suggestion:
Use InitializeCriticalSectionAndSpinCount instead
int i;
pthread_t t[NUMTHREADS + 1];
InitializeCriticalSection(&pop_count.cs);
assert((t[0] = pthread_self()).p != NULL);
for (i = 1; i <= NUMTHREADS; i++)
{
Reported by FlawFinder.