The following issues were found
libavfilter/vulkan.h
1 issues
Line: 42
Column: 62
CWE codes:
126
#define GLSLA(...) av_bprintf(&shd->src, __VA_ARGS__)
#define GLSLF(N, S, ...) av_bprintf(&shd->src, C(N, S), __VA_ARGS__)
#define GLSLD(D) GLSLC(0, ); \
av_bprint_append_data(&shd->src, D, strlen(D)); \
GLSLC(0, )
/* Helper, pretty much every Vulkan return value needs to be checked */
#define RET(x) \
do { \
Reported by FlawFinder.
libavformat/adtsenc.c
1 issues
Line: 189
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ret = ff_alloc_extradata(par, side_data_size);
if (ret < 0)
return ret;
memcpy(par->extradata, side_data, side_data_size);
}
}
if (adts->write_adts) {
int err = adts_write_frame_header(adts, buf, pkt->size,
adts->pce_size);
Reported by FlawFinder.
libavformat/aiffenc.c
1 issues
Line: 89
Column: 20
CWE codes:
126
AVIOContext *pb = s->pb;
if (tag = av_dict_get(s->metadata, key, NULL, 0)) {
int size = strlen(tag->value);
avio_wl32(pb, id);
avio_wb32(pb, FFALIGN(size, 2));
avio_write(pb, tag->value, size);
if (size & 1)
Reported by FlawFinder.
libavformat/alp.c
1 issues
Line: 37
Column: 5
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
typedef struct ALPHeader {
uint32_t magic; /*< Magic Number, {'A', 'L', 'P', ' '} */
uint32_t header_size; /*< Header size (after this). */
char adpcm[6]; /*< "ADPCM" */
uint8_t unk1; /*< Unknown */
uint8_t num_channels; /*< Channel Count. */
uint32_t sample_rate; /*< Sample rate, only if header_size >= 12. */
} ALPHeader;
Reported by FlawFinder.
libavformat/apetag.c
1 issues
Line: 194
Column: 19
CWE codes:
126
continue;
}
val_len = strlen(e->value);
avio_wl32(dyn_bc, val_len); // value length
avio_wl32(dyn_bc, 0); // item flags
avio_put_str(dyn_bc, e->key); // key
avio_write(dyn_bc, e->value, val_len); // value
count++;
Reported by FlawFinder.
libavformat/asf.c
1 issues
Line: 182
Column: 5
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 CodecMime *mime = ff_id3v2_mime_tags;
enum AVCodecID id = AV_CODEC_ID_NONE;
char mimetype[64];
uint8_t *desc = NULL;
AVStream *st = NULL;
int ret, type, picsize, desc_len;
/* type + picsize + mime + desc */
Reported by FlawFinder.
libavformat/asfenc.c
1 issues
Line: 226
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
uint32_t seqno;
int is_streamed;
ASFStream streams[128]; ///< it's max number and it's not that big
const char *languages[128];
int nb_languages;
int64_t creation_time;
/* non-streamed additional info */
uint64_t nb_packets; ///< how many packets are there in the file, invalid if broadcasting
int64_t duration; ///< in 100ns units
Reported by FlawFinder.
libavformat/async.c
1 issues
Line: 606
Column: 14
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
int64_t size;
int64_t pos;
int64_t read_len;
unsigned char buf[4096];
AVDictionary *opts = NULL;
ffurl_register_protocol(&ff_async_protocol);
ffurl_register_protocol(&ff_async_test_protocol);
Reported by FlawFinder.
libavformat/av1.c
1 issues
Line: 268
CWE codes:
908
if (decoder_model_info_present_flag) {
if (get_bits1(&gb)) { // decoder_model_present_for_this_op
skip_bits_long(&gb, buffer_delay_length_minus_1 + 1); // decoder_buffer_delay
skip_bits_long(&gb, buffer_delay_length_minus_1 + 1); // encoder_buffer_delay
skip_bits1(&gb); // low_delay_mode_flag
}
}
if (initial_display_delay_present_flag) {
Reported by Cppcheck.
libavformat/avlanguage.c
1 issues
Line: 29
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
#include <string.h>
typedef struct LangEntry {
const char str[4];
uint16_t next_equivalent;
} LangEntry;
static const uint16_t lang_table_counts[] = { 484, 20, 184 };
static const uint16_t lang_table_offsets[] = { 0, 484, 504 };
Reported by FlawFinder.