cwe_id stringclasses 8
values | func stringlengths 40 61.2k | label int64 0 1 | cve_id stringlengths 13 16 | id int64 0 3.29k | text_label stringclasses 2
values |
|---|---|---|---|---|---|
CWE-416 | init_evalarg(evalarg_T *evalarg)
{
CLEAR_POINTER(evalarg);
ga_init2(&evalarg->eval_tofree_ga, sizeof(char_u *), 20);
} | 0 | CVE-2022-2889 | 2,815 | benign |
CWE-416 | init_evalarg(evalarg_T *evalarg)
{
CLEAR_POINTER(evalarg);
ga_init2(&evalarg->eval_tofree_ga, sizeof(char_u *), 20);
} | 1 | CVE-2022-2889 | 2,815 | vulnerable |
CWE-476 | mrb_proc_init_copy(mrb_state *mrb, mrb_value self)
{
mrb_value proc = mrb_get_arg1(mrb);
if (!mrb_proc_p(proc)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
}
mrb_proc_copy(mrb_proc_ptr(self), mrb_proc_ptr(proc));
return self;
} | 0 | CVE-2021-4110 | 1,761 | benign |
CWE-476 | mrb_proc_init_copy(mrb_state *mrb, mrb_value self)
{
mrb_value proc = mrb_get_arg1(mrb);
if (!mrb_proc_p(proc)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
}
mrb_proc_copy(mrb, mrb_proc_ptr(self), mrb_proc_ptr(proc));
return self;
} | 1 | CVE-2021-4110 | 1,761 | vulnerable |
CWE-119 | static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
unsigned x, y;
AVFilterContext *ctx = inlink->dst;
VignetteContext *s = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
av_f... | 0 | CVE-2013-4263 | 923 | benign |
CWE-119 | static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
unsigned x, y;
AVFilterContext *ctx = inlink->dst;
VignetteContext *s = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
av_f... | 1 | CVE-2013-4263 | 923 | vulnerable |
CWE-476 | int build_segment_manager(struct f2fs_sb_info *sbi)
{
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
struct f2fs_sm_info *sm_info;
int err;
sm_info = kzalloc(sizeof(struct f2fs_sm_info), GFP_KERNEL);
if (!sm_info)
return -ENOMEM;
/* init sm info */
s... | 0 | CVE-2017-18241 | 979 | benign |
CWE-476 | int build_segment_manager(struct f2fs_sb_info *sbi)
{
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
struct f2fs_sm_info *sm_info;
int err;
sm_info = kzalloc(sizeof(struct f2fs_sm_info), GFP_KERNEL);
if (!sm_info)
return -ENOMEM;
/* init sm info */
s... | 1 | CVE-2017-18241 | 979 | vulnerable |
CWE-787 | static uint get_alen(char *arg, int default_len)
{
int j;
int alen;
alen = default_len;
for (j = 0; j < 8; j++) {
if (arg[j] == '.') {
alen = arg[j+1] - '0';
break;
} else if (arg[j] == '\0')
break;
}
return alen;
} | 0 | CVE-2022-34835 | 1,436 | benign |
CWE-787 | static uint get_alen(char *arg, uint default_len)
{
uint j;
uint alen;
alen = default_len;
for (j = 0; j < 8; j++) {
if (arg[j] == '.') {
alen = arg[j+1] - '0';
break;
} else if (arg[j] == '\0')
break;
}
return alen;
} | 1 | CVE-2022-34835 | 1,436 | vulnerable |
CWE-787 | static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
uint chip;
ulong addr;
int alen;
int count;
uchar byte;
ulong crc;
ulong err;
int ret = 0;
#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *dev;
#endif
if (argc < 4)
return CMD_RET_USAGE;
/*
* Chip is always spe... | 0 | CVE-2022-34835 | 1,430 | benign |
CWE-787 | static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
uint chip;
ulong addr;
uint alen;
uint count;
uchar byte;
ulong crc;
ulong err;
int ret = 0;
#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *dev;
#endif
if (argc < 4)
return CMD_RET_USAGE;
/*
* Chip is always s... | 1 | CVE-2022-34835 | 1,430 | vulnerable |
CWE-476 | jp2_box_t *jp2_box_create(int type)
{
jp2_box_t *box;
jp2_boxinfo_t *boxinfo;
if (!(box = jas_malloc(sizeof(jp2_box_t)))) {
return 0;
}
memset(box, 0, sizeof(jp2_box_t));
box->type = type;
box->len = 0;
if (!(boxinfo = jp2_boxinfolookup(type))) {
return 0;
}
box->info = boxinfo;
box->ops = &boxinfo->ops... | 0 | CVE-2017-6850 | 1,511 | benign |
CWE-476 | jp2_box_t *jp2_box_create(int type)
{
jp2_box_t *box;
jp2_boxinfo_t *boxinfo;
if (!(box = jp2_box_create0())) {
return 0;
}
box->type = type;
box->len = 0;
if (!(boxinfo = jp2_boxinfolookup(type))) {
return 0;
}
box->info = boxinfo;
box->ops = &boxinfo->ops;
return box;
} | 1 | CVE-2017-6850 | 1,511 | vulnerable |
CWE-119 | void Init(void)
{
for(int i = 0;i < 19;i++) {
#ifdef DEBUG_QMCODER
char string[5] = "X0 ";
string[1] = (i / 10) + '0';
string[2] = (i % 10) + '0';
X[i].Init(string);
string[0] = 'M';
M[i].Init(string);
#else
X[i].Init();
... | 0 | CVE-2022-31620 | 1,650 | benign |
CWE-119 | void Init(void)
{
for(int i = 0;i < MagnitudeContexts;i++) {
#ifdef DEBUG_QMCODER
char string[5] = "X0 ";
string[1] = (i / 10) + '0';
string[2] = (i % 10) + '0';
X[i].Init(string);
string[0] = 'M';
M[i].Init(string);
#else
X[i].I... | 1 | CVE-2022-31620 | 1,650 | vulnerable |
CWE-119 | void Huff_offsetReceive (node_t *node, int *ch, byte *fin, int *offset) {
bloc = *offset;
while (node && node->symbol == INTERNAL_NODE) {
if (get_bit(fin)) {
node = node->right;
} else {
node = node->left;
}
}
if (!node) {
*ch = 0;
return;
// Com_Error(ERR_DROP, "Illegal tree!");
}
*ch = node->sy... | 0 | CVE-2017-11721 | 538 | benign |
CWE-119 | void Huff_offsetReceive (node_t *node, int *ch, byte *fin, int *offset, int maxoffset) {
bloc = *offset;
while (node && node->symbol == INTERNAL_NODE) {
if (bloc >= maxoffset) {
*ch = 0;
*offset = maxoffset + 1;
return;
}
if (get_bit(fin)) {
node = node->right;
} else {
node = node->left;
}
... | 1 | CVE-2017-11721 | 538 | vulnerable |
CWE-119 | String string_number_format(double d, int dec,
const String& dec_point,
const String& thousand_sep) {
char *tmpbuf = nullptr, *resbuf;
char *s, *t; /* source, target */
char *dp;
int integral;
int tmplen, reslen=0;
int count=0;
int is_negative=0;
... | 0 | CVE-2019-11929 | 2,298 | benign |
CWE-119 | String string_number_format(double d, int dec,
const String& dec_point,
const String& thousand_sep) {
char *tmpbuf = nullptr, *resbuf;
char *s, *t; /* source, target */
char *dp;
int integral;
int tmplen, reslen=0;
int count=0;
int is_negative=0;
... | 1 | CVE-2019-11929 | 2,298 | vulnerable |
CWE-119 | static int hns_xgmac_get_sset_count(int stringset)
{
if (stringset == ETH_SS_STATS)
return ARRAY_SIZE(g_xgmac_stats_string);
return 0;
} | 0 | CVE-2017-18222 | 3,067 | benign |
CWE-119 | static int hns_xgmac_get_sset_count(int stringset)
{
if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
return ARRAY_SIZE(g_xgmac_stats_string);
return 0;
} | 1 | CVE-2017-18222 | 3,067 | vulnerable |
CWE-362 | static void clear_evtchn_to_irq_row(unsigned row)
{
unsigned col;
for (col = 0; col < EVTCHN_PER_ROW; col++)
evtchn_to_irq[row][col] = -1;
} | 0 | CVE-2020-27675 | 3,284 | benign |
CWE-362 | static void clear_evtchn_to_irq_row(unsigned row)
{
unsigned col;
for (col = 0; col < EVTCHN_PER_ROW; col++)
WRITE_ONCE(evtchn_to_irq[row][col], -1);
} | 1 | CVE-2020-27675 | 3,284 | vulnerable |
CWE-416 | static void cil_reset_classperms_set(struct cil_classperms_set *cp_set)
{
cil_reset_classpermission(cp_set->set);
} | 0 | CVE-2021-36086 | 2,411 | benign |
CWE-416 | static void cil_reset_classperms_set(struct cil_classperms_set *cp_set)
{
if (cp_set == NULL) {
return;
}
cp_set->set = NULL;
} | 1 | CVE-2021-36086 | 2,411 | vulnerable |
CWE-119 | CAMLprim value caml_bitvect_test(value bv, value n)
{
int pos = Int_val(n);
return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7)));
} | 0 | CVE-2015-8869 | 380 | benign |
CWE-119 | CAMLprim value caml_bitvect_test(value bv, value n)
{
intnat pos = Long_val(n);
return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7)));
} | 1 | CVE-2015-8869 | 380 | vulnerable |
CWE-125 | static inline Quantum GetPixelChannel(const Image *magick_restrict image,
const PixelChannel channel,const Quantum *magick_restrict pixel)
{
if (image->channel_map[channel].traits == UndefinedPixelTrait)
return((Quantum) 0);
return(pixel[image->channel_map[channel].offset]);
} | 0 | CVE-2019-13299 | 1,295 | benign |
CWE-125 | static inline Quantum GetPixelChannel(const Image *magick_restrict image,
const PixelChannel channel,const Quantum *magick_restrict pixel)
{
if (image->channel_map[image->channel_map[channel].offset].traits == UndefinedPixelTrait)
return((Quantum) 0);
return(pixel[image->channel_map[channel].offset]);
} | 1 | CVE-2019-13299 | 1,295 | vulnerable |
CWE-119 | static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct device *dev = &intf->dev;
struct usb_device *usbdev = interface_to_usbdev(intf);
struct net_device *netdev;
struct catc *catc;
u8 broadcast[ETH_ALEN];
int i, pktsz, ret;
if (usb_set_interface(usbdev,
intf->altsetting->... | 0 | CVE-2017-8070 | 1,786 | benign |
CWE-119 | static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct device *dev = &intf->dev;
struct usb_device *usbdev = interface_to_usbdev(intf);
struct net_device *netdev;
struct catc *catc;
u8 broadcast[ETH_ALEN];
int pktsz, ret;
if (usb_set_interface(usbdev,
intf->altsetting->des... | 1 | CVE-2017-8070 | 1,786 | vulnerable |
CWE-125 | ImagingPcxDecode(Imaging im, ImagingCodecState state, UINT8* buf, Py_ssize_t bytes)
{
UINT8 n;
UINT8* ptr;
if (strcmp(im->mode, "1") == 0 && state->xsize > state->bytes * 8) {
state->errcode = IMAGING_CODEC_OVERRUN;
return -1;
} else if (strcmp(im->mode, "P") == 0 && state->xsize > stat... | 0 | CVE-2020-10378 | 2,008 | benign |
CWE-125 | ImagingPcxDecode(Imaging im, ImagingCodecState state, UINT8* buf, Py_ssize_t bytes)
{
UINT8 n;
UINT8* ptr;
if ((state->xsize * state->bits + 7) / 8 > state->bytes) {
state->errcode = IMAGING_CODEC_OVERRUN;
return -1;
}
ptr = buf;
for (;;) {
if (bytes < 1)
return ptr - b... | 1 | CVE-2020-10378 | 2,008 | vulnerable |
CWE-125 | TfLiteStatus MaxEval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data);
OpData* data = reinterpret_cast<OpData*>(node->user_data);
TfLiteTensor* output = GetOutput(context, node, 0);
const TfLiteTensor* input = GetInput(context, node, 0);
switc... | 0 | CVE-2020-15211 | 197 | benign |
CWE-125 | TfLiteStatus MaxEval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data);
OpData* data = reinterpret_cast<OpData*>(node->user_data);
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output));
const TfLiteTensor* i... | 1 | CVE-2020-15211 | 197 | vulnerable |
CWE-362 | static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
{
ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
shm_rmid(ns, shp);
shm_unlock(shp);
if (!is_file_hugepages(shp->shm_file))
shmem_lock(shp->shm_file, 0, shp->mlock_user);
else if (shp->mlock_user)
user_shm_unlock(file_i... | 0 | CVE-2013-7026 | 227 | benign |
CWE-362 | static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
{
struct file *shm_file;
shm_file = shp->shm_file;
shp->shm_file = NULL;
ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
shm_rmid(ns, shp);
shm_unlock(shp);
if (!is_file_hugepages(shm_file))
shmem_lock(shm_file, 0, shp-... | 1 | CVE-2013-7026 | 227 | vulnerable |
CWE-125 | static const char *vgacon_startup(void)
{
const char *display_desc = NULL;
u16 saved1, saved2;
volatile u16 *p;
if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB ||
screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) {
no_vga:
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
return conswitchp->co... | 0 | CVE-2020-28097 | 176 | benign |
CWE-125 | static const char *vgacon_startup(void)
{
const char *display_desc = NULL;
u16 saved1, saved2;
volatile u16 *p;
if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB ||
screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) {
no_vga:
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
return conswitchp->co... | 1 | CVE-2020-28097 | 176 | vulnerable |
CWE-125 | TfLiteStatus Resize(TfLiteContext* context, TfLiteNode* node) {
auto* params =
reinterpret_cast<TfLiteLSHProjectionParams*>(node->builtin_data);
TF_LITE_ENSURE(context, NumInputs(node) == 2 || NumInputs(node) == 3);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* hash = GetInput(cont... | 0 | CVE-2020-15211 | 1,075 | benign |
CWE-125 | TfLiteStatus Resize(TfLiteContext* context, TfLiteNode* node) {
auto* params =
reinterpret_cast<TfLiteLSHProjectionParams*>(node->builtin_data);
TF_LITE_ENSURE(context, NumInputs(node) == 2 || NumInputs(node) == 3);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* hash;
TF_LITE_ENSU... | 1 | CVE-2020-15211 | 1,075 | vulnerable |
CWE-20 | error_t ipv6AddRoute(const Ipv6Addr *prefix, uint_t prefixLen,
NetInterface *interface, const Ipv6Addr *nextHop, uint_t metric)
{
error_t error;
uint_t i;
Ipv6RoutingTableEntry *entry;
Ipv6RoutingTableEntry *firstFreeEntry;
//Check parameters
if(prefix == NULL || interface == NULL)
return ER... | 0 | CVE-2021-26788 | 2,110 | benign |
CWE-20 | error_t ipv6AddRoute(const Ipv6Addr *prefix, uint_t prefixLen,
NetInterface *interface, const Ipv6Addr *nextHop, uint_t metric)
{
error_t error;
uint_t i;
Ipv6RoutingTableEntry *entry;
Ipv6RoutingTableEntry *firstFreeEntry;
//Check parameters
if(prefix == NULL || interface == NULL)
return ER... | 1 | CVE-2021-26788 | 2,110 | vulnerable |
CWE-119 | get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e,
const char *hookname, const char **chainname,
const char **comment, unsigned int *rulenum)
{
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET) ==... | 0 | CVE-2016-3134 | 3,235 | benign |
CWE-119 | get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e,
const char *hookname, const char **chainname,
const char **comment, unsigned int *rulenum)
{
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET) ==... | 1 | CVE-2016-3134 | 3,235 | vulnerable |
CWE-190 | static s32 gf_avc_read_pps_bs_internal(GF_BitStream *bs, AVCState *avc, u32 nal_hdr)
{
s32 pps_id;
AVC_PPS *pps;
gf_bs_enable_emulation_byte_removal(bs, GF_TRUE);
if (!nal_hdr) {
gf_bs_read_int_log(bs, 1, "forbidden_zero_bit");
gf_bs_read_int_log(bs, 2, "nal_ref_idc");
gf_bs_read_int_log(bs, 5, "nal_unit_ty... | 0 | CVE-2021-30014 | 891 | benign |
CWE-190 | static s32 gf_avc_read_pps_bs_internal(GF_BitStream *bs, AVCState *avc, u32 nal_hdr)
{
s32 pps_id;
AVC_PPS *pps;
gf_bs_enable_emulation_byte_removal(bs, GF_TRUE);
if (!nal_hdr) {
gf_bs_read_int_log(bs, 1, "forbidden_zero_bit");
gf_bs_read_int_log(bs, 2, "nal_ref_idc");
gf_bs_read_int_log(bs, 5, "nal_unit_ty... | 1 | CVE-2021-30014 | 891 | vulnerable |
CWE-787 | static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, const BYTE* data,
UINT32 scanline)
{
UINT16 x;
UINT16 y;
UINT16 rw;
BYTE ccl;
const BYTE* src;
BYTE* yplane = NULL;
BYTE* coplane = NULL;
BYTE* cgplane = NULL;
BYTE* aplane = NULL;
INT16 r_val;
INT16 g_val;
INT... | 0 | CVE-2018-8788 | 3,008 | benign |
CWE-787 | static BOOL nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, const BYTE* data,
UINT32 scanline)
{
UINT16 x;
UINT16 y;
UINT16 rw;
BYTE ccl;
const BYTE* src;
BYTE* yplane = NULL;
BYTE* coplane = NULL;
BYTE* cgplane = NULL;
BYTE* aplane = NULL;
INT16 r_val;
INT16 g_val;
INT... | 1 | CVE-2018-8788 | 3,008 | vulnerable |
CWE-787 | HexOutStream::HexOutStream(OutStream& os, int buflen)
: out_stream(os), offset(0), bufSize(buflen ? buflen : DEFAULT_BUF_LEN)
{
if (bufSize % 2)
bufSize--;
ptr = start = new U8[bufSize];
end = start + bufSize;
} | 0 | CVE-2019-15694 | 2,454 | benign |
CWE-787 | HexOutStream::HexOutStream(OutStream& os, size_t buflen)
: out_stream(os), offset(0), bufSize(buflen ? buflen : DEFAULT_BUF_LEN)
{
if (bufSize % 2)
bufSize--;
ptr = start = new U8[bufSize];
end = start + bufSize;
} | 1 | CVE-2019-15694 | 2,454 | vulnerable |
CWE-362 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr)
{
struct ip_options *opt;
opt = inet_sk(sk)->opt;
if (opt == NULL || opt->cipso == 0)
return -ENOMSG;
return cipso_v4_getattr(opt->__data + opt->cipso - sizeof(struct iphdr),
secattr);
} | 0 | CVE-2012-3552 | 3,026 | benign |
CWE-362 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr)
{
struct ip_options_rcu *opt;
int res = -ENOMSG;
rcu_read_lock();
opt = rcu_dereference(inet_sk(sk)->inet_opt);
if (opt && opt->opt.cipso)
res = cipso_v4_getattr(opt->opt.__data +
opt->opt.cipso -
sizeof(struct iphdr),
... | 1 | CVE-2012-3552 | 3,026 | vulnerable |
CWE-787 | UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLength) {
if(!isWritable() || srcLength == 0 || srcChars == NULL) {
return *this;
}
// Perform all remaining operations relative to srcChars + srcStart.
// From this point forward, do not use srcStart.
srcChars += srcStart;
if... | 0 | CVE-2020-10531 | 1,525 | benign |
CWE-787 | UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLength) {
if(!isWritable() || srcLength == 0 || srcChars == NULL) {
return *this;
}
// Perform all remaining operations relative to srcChars + srcStart.
// From this point forward, do not use srcStart.
srcChars += srcStart;
if... | 1 | CVE-2020-10531 | 1,525 | vulnerable |
CWE-416 | bool ActiveStreamDecoderFilter::complete() { return parent_.state_.remote_complete_; } | 0 | CVE-2021-43825 | 3,167 | benign |
CWE-416 | bool ActiveStreamDecoderFilter::complete() { return parent_.state_.remote_decode_complete_; } | 1 | CVE-2021-43825 | 3,167 | vulnerable |
CWE-119 | rtadv_read (struct thread *thread)
{
int sock;
int len;
u_char buf[RTADV_MSG_SIZE];
struct sockaddr_in6 from;
ifindex_t ifindex = 0;
int hoplimit = -1;
struct zebra_vrf *zvrf = THREAD_ARG (thread);
sock = THREAD_FD (thread);
zvrf->rtadv.ra_read = NULL;
/* Register myself. */
rtadv_event (zvrf, R... | 0 | CVE-2016-1245 | 2,974 | benign |
CWE-119 | rtadv_read (struct thread *thread)
{
int sock;
int len;
u_char buf[RTADV_MSG_SIZE];
struct sockaddr_in6 from;
ifindex_t ifindex = 0;
int hoplimit = -1;
struct zebra_vrf *zvrf = THREAD_ARG (thread);
sock = THREAD_FD (thread);
zvrf->rtadv.ra_read = NULL;
/* Register myself. */
rtadv_event (zvrf, R... | 1 | CVE-2016-1245 | 2,974 | vulnerable |
CWE-416 | int bus_verify_polkit_async(
sd_bus_message *call,
int capability,
const char *action,
const char **details,
bool interactive,
uid_t good_user,
Hashmap **registry,
sd_bus_error *ret_error) {
... | 0 | CVE-2020-1712 | 3,044 | benign |
CWE-416 | int bus_verify_polkit_async(
sd_bus_message *call,
int capability,
const char *action,
const char **details,
bool interactive,
uid_t good_user,
Hashmap **registry,
sd_bus_error *ret_error) {
... | 1 | CVE-2020-1712 | 3,044 | vulnerable |
CWE-125 | TfLiteStatus SoftmaxEval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteSoftmaxParams*>(node->builtin_data);
SoftmaxOpData* data = reinterpret_cast<SoftmaxOpData*>(node->user_data);
const TfLiteTensor* input = GetInput(context, node, 0);
TfLiteTensor* output = GetOutput(conte... | 0 | CVE-2020-15211 | 2,435 | benign |
CWE-125 | TfLiteStatus SoftmaxEval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteSoftmaxParams*>(node->builtin_data);
SoftmaxOpData* data = reinterpret_cast<SoftmaxOpData*>(node->user_data);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input));... | 1 | CVE-2020-15211 | 2,435 | vulnerable |
CWE-125 | get_word_rgb_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading raw-word-format PPM files with any maxval */
{
ppm_source_ptr source = (ppm_source_ptr)sinfo;
register JSAMPROW ptr;
register U_CHAR *bufferptr;
register JSAMPLE *rescale = source->rescale;
JDIMENSION col;
unsigned... | 0 | CVE-2018-14498 | 3,259 | benign |
CWE-125 | get_word_rgb_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading raw-word-format PPM files with any maxval */
{
ppm_source_ptr source = (ppm_source_ptr)sinfo;
register JSAMPROW ptr;
register U_CHAR *bufferptr;
register JSAMPLE *rescale = source->rescale;
JDIMENSION col;
unsigned... | 1 | CVE-2018-14498 | 3,259 | vulnerable |
CWE-125 | ip_printroute(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register u_int ptr;
register u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
return;
}
if ((length + 1) & 3)
ND_PRINT((ndo, " [bad length %u]", length));
ptr = cp[2] - 1;
if (ptr < 3 |... | 0 | CVE-2017-13022 | 767 | benign |
CWE-125 | ip_printroute(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register u_int ptr;
register u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
return (0);
}
if ((length + 1) & 3)
ND_PRINT((ndo, " [bad length %u]", length));
ND_TCHECK(cp[2]);
ptr = cp... | 1 | CVE-2017-13022 | 767 | vulnerable |
CWE-125 | static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
{
const char* loc_name = NULL;
int loc_name_len = 0;
char* tag_value = NULL;
char* empty_result = "";
int result = 0;
char* msg = NULL;
UErrorCode status =... | 0 | CVE-2016-5093 | 564 | benign |
CWE-125 | static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
{
const char* loc_name = NULL;
int loc_name_len = 0;
char* tag_value = NULL;
char* empty_result = "";
int result = 0;
char* msg = NULL;
UErrorCode status = ... | 1 | CVE-2016-5093 | 564 | vulnerable |
CWE-125 | static int uas_find_uas_alt_setting(struct usb_interface *intf)
{
int i;
for (i = 0; i < intf->num_altsetting; i++) {
struct usb_host_interface *alt = &intf->altsetting[i];
if (uas_is_interface(alt))
return alt->desc.bAlternateSetting;
}
return -ENODEV;
} | 0 | CVE-2017-16530 | 1,272 | benign |
CWE-125 | static struct usb_host_interface *uas_find_uas_alt_setting(
struct usb_interface *intf)
{
int i;
for (i = 0; i < intf->num_altsetting; i++) {
struct usb_host_interface *alt = &intf->altsetting[i];
if (uas_is_interface(alt))
return alt;
}
return NULL;
} | 1 | CVE-2017-16530 | 1,272 | vulnerable |
CWE-119 | static void mspack_fmap_free(void *mem)
{
free(mem);
} | 0 | CVE-2017-6419 | 1,913 | benign |
CWE-119 | static void mspack_fmap_free(void *mem)
{
if(mem) {
free(mem);
mem = NULL;
}
return;
} | 1 | CVE-2017-6419 | 1,913 | vulnerable |
CWE-787 | ptaReadStream(FILE *fp)
{
char typestr[128];
l_int32 i, n, ix, iy, type, version;
l_float32 x, y;
PTA *pta;
PROCNAME("ptaReadStream");
if (!fp)
return (PTA *)ERROR_PTR("stream not defined", procName, NULL);
if (fscanf(fp, "\n Pta Version %d\n", &version) != 1)
return (PTA... | 0 | CVE-2018-7186 | 1,767 | benign |
CWE-787 | ptaReadStream(FILE *fp)
{
char typestr[128]; /* hardcoded below in fscanf */
l_int32 i, n, ix, iy, type, version;
l_float32 x, y;
PTA *pta;
PROCNAME("ptaReadStream");
if (!fp)
return (PTA *)ERROR_PTR("stream not defined", procName, NULL);
if (fscanf(fp, "\n Pta Version %d\n", &v... | 1 | CVE-2018-7186 | 1,767 | vulnerable |
CWE-125 | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 3);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 2);
const TfLiteTensor* lookup = GetInput(context, node, 0);
TF_LITE_ENSURE_EQ(context, NumDimensions(lookup), 1);
TF_LITE_ENSURE_EQ(context, lookup->t... | 0 | CVE-2020-15211 | 2,801 | benign |
CWE-125 | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 3);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 2);
const TfLiteTensor* lookup;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &lookup));
TF_LITE_ENSURE_EQ(context, NumDimensions(lookup), ... | 1 | CVE-2020-15211 | 2,801 | vulnerable |
CWE-125 | TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 1);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input = GetInput(context, node, 0);
TfLiteTensor* output = GetOutput(context, node, 0);
TF_LITE_ENSURE_TYPES_EQ(context, ... | 0 | CVE-2020-15211 | 2,420 | benign |
CWE-125 | TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 1);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_OK(cont... | 1 | CVE-2020-15211 | 2,420 | vulnerable |
CWE-20 | wb_prep(netdissect_options *ndo,
const struct pkt_prep *prep, u_int len)
{
int n;
const struct pgstate *ps;
const u_char *ep = ndo->ndo_snapend;
ND_PRINT((ndo, " wb-prep:"));
if (len < sizeof(*prep)) {
return (-1);
}
n = EXTRACT_32BITS(&prep->pp_n);
ps = (const struct pgstate *)(prep + 1);
while (--... | 0 | CVE-2015-3138 | 869 | benign |
CWE-20 | wb_prep(netdissect_options *ndo,
const struct pkt_prep *prep, u_int len)
{
int n;
const struct pgstate *ps;
const u_char *ep = ndo->ndo_snapend;
ND_PRINT((ndo, " wb-prep:"));
if (len < sizeof(*prep)) {
return (-1);
}
n = EXTRACT_32BITS(&prep->pp_n);
ps = (const struct pgstate *)(prep + 1);
while (--... | 1 | CVE-2015-3138 | 869 | vulnerable |
CWE-476 | mrb_ary_shift_m(mrb_state *mrb, mrb_value self)
{
struct RArray *a = mrb_ary_ptr(self);
mrb_int len = ARY_LEN(a);
mrb_int n;
mrb_value val;
if (mrb_get_args(mrb, "|i", &n) == 0) {
return mrb_ary_shift(mrb, self);
};
ary_modify_check(mrb, a);
if (len == 0 || n == 0) return mrb_ary_new(mrb);
if (n ... | 0 | CVE-2021-4188 | 2,266 | benign |
CWE-476 | mrb_ary_shift_m(mrb_state *mrb, mrb_value self)
{
mrb_int n;
if (mrb_get_args(mrb, "|i", &n) == 0) {
return mrb_ary_shift(mrb, self);
}
struct RArray *a = mrb_ary_ptr(self);
mrb_int len = ARY_LEN(a);
mrb_value val;
ary_modify_check(mrb, a);
if (len == 0 || n == 0) return mrb_ary_new(mrb);
if (n... | 1 | CVE-2021-4188 | 2,266 | vulnerable |
CWE-119 | int main(int argc, char *argv[])
{
opj_dinfo_t* dinfo;
opj_event_mgr_t event_mgr; /* event manager */
int tnum;
unsigned int snum;
opj_mj2_t *movie;
mj2_tk_t *track;
mj2_sample_t *sample;
unsigned char* frame_codestream;
FILE *file, *outfile;
char outfilename[50];
mj2_dp... | 0 | CVE-2018-7648 | 976 | benign |
CWE-119 | int main(int argc, char *argv[])
{
opj_dinfo_t* dinfo;
opj_event_mgr_t event_mgr; /* event manager */
int tnum;
unsigned int snum;
opj_mj2_t *movie;
mj2_tk_t *track;
mj2_sample_t *sample;
unsigned char* frame_codestream;
FILE *file, *outfile;
char outfilename[50];
mj2_dp... | 1 | CVE-2018-7648 | 976 | vulnerable |
CWE-125 | TfLiteStatus SigmoidEval(TfLiteContext* context, TfLiteNode* node) {
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input = GetInput(context, node, 0);
TfLiteTensor* output = GetOutput(context, node, 0);
switch (input->type) {
case kTfLiteFloat32: {
if (kernel_type == ... | 0 | CVE-2020-15211 | 2,433 | benign |
CWE-125 | TfLiteStatus SigmoidEval(TfLiteContext* context, TfLiteNode* node) {
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &outp... | 1 | CVE-2020-15211 | 2,433 | vulnerable |
CWE-416 | R_API bool r_crbtree_insert(RRBTree *tree, void *data, RRBComparator cmp, void *user) {
r_return_val_if_fail (tree && data && cmp, false);
bool inserted = false;
if (tree->root == NULL) {
tree->root = _node_new (data, NULL);
if (tree->root == NULL) {
return false;
}
inserted = true;
goto out_exit;
}
... | 0 | CVE-2022-1444 | 733 | benign |
CWE-416 | R_API bool r_crbtree_insert(RRBTree *tree, void *data, RRBComparator cmp, void *user) {
r_return_val_if_fail (tree && data && cmp, false);
bool inserted = false;
if (!tree->root) {
tree->root = _node_new (data, NULL);
if (!tree->root) {
return false;
}
inserted = true;
goto out_exit;
}
RRBNode head;... | 1 | CVE-2022-1444 | 733 | vulnerable |
CWE-476 | proc_lambda(mrb_state *mrb, mrb_value self)
{
mrb_value blk;
struct RProc *p;
mrb_get_args(mrb, "&", &blk);
if (mrb_nil_p(blk)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Proc object without a block");
}
if (!mrb_proc_p(blk)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
}
p = mrb_... | 0 | CVE-2021-4110 | 1,763 | benign |
CWE-476 | proc_lambda(mrb_state *mrb, mrb_value self)
{
mrb_value blk;
struct RProc *p;
mrb_get_args(mrb, "&", &blk);
if (mrb_nil_p(blk)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Proc object without a block");
}
if (!mrb_proc_p(blk)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
}
p = mrb_... | 1 | CVE-2021-4110 | 1,763 | vulnerable |
CWE-125 | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
OpData* data = reinterpret_cast<OpData*>(node->user_data);
auto* params = reinterpret_cast<TfLiteSubParams*>(node->builtin_data);
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTens... | 0 | CVE-2020-15211 | 2,633 | benign |
CWE-125 | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
OpData* data = reinterpret_cast<OpData*>(node->user_data);
auto* params = reinterpret_cast<TfLiteSubParams*>(node->builtin_data);
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTens... | 1 | CVE-2020-15211 | 2,633 | vulnerable |
CWE-119 | static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
struct ceph_crypto_key *secret,
void *buf, void *end)
{
void *p = buf;
char *dbuf;
char *ticket_buf;
u8 reply_struct_v;
u32 num;
int ret;
dbuf = kmalloc(TEMP_TICKET_BUF_LEN, GFP_NOFS);
if (!dbuf)
return -ENOMEM;
ret = -ENOMEM;... | 0 | CVE-2014-6416 | 3,176 | benign |
CWE-119 | static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
struct ceph_crypto_key *secret,
void *buf, void *end)
{
void *p = buf;
u8 reply_struct_v;
u32 num;
int ret;
ceph_decode_8_safe(&p, end, reply_struct_v, bad);
if (reply_struct_v != 1)
return -EINVAL;
ceph_decode_32_safe(&p, end, ... | 1 | CVE-2014-6416 | 3,176 | vulnerable |
CWE-125 | void fx_DataView(txMachine* the)
{
txSlot* slot;
txBoolean flag = 0;
txInteger offset, size;
txSlot* info;
txSlot* instance;
txSlot* view;
txSlot* buffer;
if (mxIsUndefined(mxTarget))
mxTypeError("call: DataView");
if ((mxArgc > 0) && (mxArgv(0)->kind == XS_REFERENCE_KIND)) {
slot = mxArgv(0)->value.refere... | 0 | CVE-2022-29368 | 1,606 | benign |
CWE-125 | void fx_DataView(txMachine* the)
{
txSlot* slot;
txBoolean flag = 0;
txInteger offset, size;
txSlot* info;
txSlot* instance;
txSlot* view;
txSlot* buffer;
if (mxIsUndefined(mxTarget))
mxTypeError("call: DataView");
if ((mxArgc > 0) && (mxArgv(0)->kind == XS_REFERENCE_KIND)) {
slot = mxArgv(0)->value.refere... | 1 | CVE-2022-29368 | 1,606 | vulnerable |
CWE-190 | xmalloc (size_t size)
{
void *ptr = malloc (size);
if (!ptr
&& (size != 0)) /* some libc don't like size == 0 */
{
perror ("xmalloc: Memory allocation failure");
abort();
}
return ptr;
} | 0 | CVE-2017-6308 | 2,811 | benign |
CWE-190 | xmalloc (size_t num, size_t size)
{
size_t res;
if (check_mul_overflow(num, size, &res))
abort();
void *ptr = malloc (res);
if (!ptr
&& (size != 0)) /* some libc don't like size == 0 */
{
perror ("xmalloc: Memory allocation failure");
abort();
}
retur... | 1 | CVE-2017-6308 | 2,811 | vulnerable |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3