The following issues were found
tests/checkasm/checkasm.h
1 issues
Line: 239
Column: 5
CWE codes:
120
20
} while (0)
#define PERF_STOP(t) do { \
ioctl(sysfd, PERF_EVENT_IOC_DISABLE, 0); \
read(sysfd, &t, sizeof(t)); \
} while (0)
#elif CONFIG_MACOS_KPERF
#define PERF_START(t) t = ff_kperf_cycles()
#define PERF_STOP(t) t = ff_kperf_cycles() - t
#else
Reported by FlawFinder.
tests/checkasm/flacdsp.c
1 issues
Line: 67
Column: 18
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
&ref_buf[BUF_SIZE*4], &ref_buf[BUF_SIZE*5], &ref_buf[BUF_SIZE*6], &ref_buf[BUF_SIZE*7] };
uint8_t *new_src[] = { &new_buf[BUF_SIZE*0], &new_buf[BUF_SIZE*1], &new_buf[BUF_SIZE*2], &new_buf[BUF_SIZE*3],
&new_buf[BUF_SIZE*4], &new_buf[BUF_SIZE*5], &new_buf[BUF_SIZE*6], &new_buf[BUF_SIZE*7] };
static const char * const names[3] = { "ls", "rs", "ms" };
static const struct {
enum AVSampleFormat fmt;
int bits;
} fmts[] = {
{ AV_SAMPLE_FMT_S16, 16 },
Reported by FlawFinder.
tests/checkasm/huffyuvdsp.c
1 issues
Line: 51
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
fail();
randomize_buffers(src0, width);
memcpy(src1, src0, width * sizeof(uint16_t));
if (check_func(c.add_int16, "%s", name)) {
call_ref(dst0, src0, mask, width);
call_new(dst1, src1, mask, width);
if (memcmp(dst0, dst1, width * sizeof(uint16_t)))
Reported by FlawFinder.
tests/checkasm/llviddsp.c
1 issues
Line: 43
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!a0 || !a1)\
fail();\
randomize_buffers(a0, width * sizeof(type));\
memcpy(a1, a0, width*sizeof(type));\
static void check_add_bytes(LLVidDSPContext c, int width)
{
uint8_t *dst0 = av_mallocz(width);
uint8_t *dst1 = av_mallocz(width);
Reported by FlawFinder.
tests/checkasm/opusdsp.c
1 issues
Line: 55
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
declare_func(void, float *data, int period, float *gains, int len);
randomize_float(data0, MAX_SIZE + 1024);
memcpy(data1, data0, (MAX_SIZE + 1024)*sizeof(float));
call_ref(data0 + offset, period, gains, MAX_SIZE);
call_new(data1 + offset, period, gains, MAX_SIZE);
if (!float_near_abs_eps_array(data0 + offset, data1 + offset, EPS, MAX_SIZE))
Reported by FlawFinder.
tests/checkasm/videodsp.c
1 issues
Line: 58
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
int pw = src_w, ph = src_h; \
int y, x; \
randomize_buffers(src_w, src_h); \
memcpy(src1, src0, pw * ph * sizeof(type)); \
iter_1d(type, y, 0 - src_h, x, 0 - src_w, src_w - 0); \
iter_1d(type, x, src_w - 0, y, 0 - src_h, src_h - 0); \
iter_1d(type, y, src_h - 0, x, 0 - src_w, src_w - 0); \
iter_1d(type, x, 0 - src_w, y, 0 - src_h, src_h - 0); \
} while (0)
Reported by FlawFinder.
tests/utils.c
1 issues
Line: 121
Column: 13
CWE codes:
362
rgb24_to_yuv420p(lum_tab, cb_tab, cr_tab, rgb_tab, w, h);
if (filename) {
f = fopen(filename, "wb");
fprintf(f, "P5\n%d %d\n%d\n", w, h * 3 / 2, 255);
} else {
f = stdout;
}
Reported by FlawFinder.
tools/normalize.py
1 issues
Line: 10
Column: 12
encopt = sys.argv[2:-1]
ofile = sys.argv[-1]
else:
print 'usage: %s <input> [encode_options] <output>' % sys.argv[0]
sys.exit(1)
analysis_cmd = 'ffprobe -v error -of compact=p=0:nk=1 '
analysis_cmd += '-show_entries frame_tags=lavfi.r128.I -f lavfi '
analysis_cmd += "amovie='%s',ebur128=metadata=1" % ifile
Reported by Pylint.
tools/seek_print.c
1 issues
Line: 52
Column: 19
CWE codes:
120
20
Suggestion:
Check implementation on installation, or limit the size of all string inputs
int64_t min_ts, max_ts, ts;
AVPacket packet;
while ((opt = getopt(argc, argv, "h")) != -1) {
switch (opt) {
case 'h':
usage(0);
default:
usage(1);
Reported by FlawFinder.
tools/zmqshell.py
1 issues
Line: 17
Column: 16
def onecmd(self, cmd):
if cmd == 'EOF':
sys.exit(0)
print 'Sending command:[%s]' % cmd
self.requester.send(cmd)
message = self.requester.recv()
print 'Received reply:[%s]' % message
try:
Reported by Pylint.