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-119
void ACSequentialScan::DecodeBlock(LONG *block, LONG &prevdc,LONG &prevdiff, UBYTE small,UBYTE large,UBYTE kx,UBYTE dc,UBYTE ac) { // DC coding if (m_ucScanStart == 0 && m_bResidual == false) { LONG diff; struct QMContextSet::DCContextZer...
0
CVE-2022-31620
1,414
benign
CWE-119
void ACSequentialScan::DecodeBlock(LONG *block, LONG &prevdc,LONG &prevdiff, UBYTE small,UBYTE large,UBYTE kx,UBYTE dc,UBYTE ac) { // DC coding if (m_ucScanStart == 0 && m_bResidual == false) { LONG diff; struct QMContextSet::DCContextZer...
1
CVE-2022-31620
1,414
vulnerable
CWE-125
TfLiteRegistration OkOpRegistration() { TfLiteRegistration reg = {nullptr, nullptr, nullptr, nullptr}; // Set output size to the input size in OkOp::Prepare(). Code exists to have // a framework in Prepare. The input and output tensors are not used. reg.prepare = [](TfLiteContext* context, TfLiteNode...
0
CVE-2020-15211
300
benign
CWE-125
TfLiteRegistration OkOpRegistration() { TfLiteRegistration reg = {nullptr, nullptr, nullptr, nullptr}; // Set output size to the input size in OkOp::Prepare(). Code exists to have // a framework in Prepare. The input and output tensors are not used. reg.prepare = [](TfLiteContext* context, TfLiteNode...
1
CVE-2020-15211
300
vulnerable
CWE-787
de265_error seq_parameter_set::read(error_queue* errqueue, bitreader* br) { int vlc; video_parameter_set_id = get_bits(br,4); sps_max_sub_layers = get_bits(br,3) +1; if (sps_max_sub_layers>7) { return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; } sps_temporal_id_nesting_flag = get_bits(br,1); pro...
0
CVE-2022-1253
150
benign
CWE-787
de265_error seq_parameter_set::read(error_queue* errqueue, bitreader* br) { int vlc; video_parameter_set_id = get_bits(br,4); sps_max_sub_layers = get_bits(br,3) +1; if (sps_max_sub_layers>7) { return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; } sps_temporal_id_nesting_flag = get_bits(br,1); pro...
1
CVE-2022-1253
150
vulnerable
CWE-125
static int xar_get_numeric_from_xml_element(xmlTextReaderPtr reader, long * value) { const xmlChar * numstr; if (xmlTextReaderRead(reader) == 1 && xmlTextReaderNodeType(reader) == XML_READER_TYPE_TEXT) { numstr = xmlTextReaderConstValue(reader); if (numstr) { *value = atol((const cha...
0
CVE-2018-1000085
1,324
benign
CWE-125
static int xar_get_numeric_from_xml_element(xmlTextReaderPtr reader, size_t * value) { const xmlChar * numstr; ssize_t numval; if (xmlTextReaderRead(reader) == 1 && xmlTextReaderNodeType(reader) == XML_READER_TYPE_TEXT) { numstr = xmlTextReaderConstValue(reader); if (numstr) { n...
1
CVE-2018-1000085
1,324
vulnerable
CWE-125
mp_join_print(netdissect_options *ndo, const u_char *opt, u_int opt_len, u_char flags) { const struct mp_join *mpj = (const struct mp_join *) opt; if (!(opt_len == 12 && flags & TH_SYN) && !(opt_len == 16 && (flags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) && !(op...
0
CVE-2017-13040
2,281
benign
CWE-125
mp_join_print(netdissect_options *ndo, const u_char *opt, u_int opt_len, u_char flags) { const struct mp_join *mpj = (const struct mp_join *) opt; if (!(opt_len == 12 && (flags & TH_SYN)) && !(opt_len == 16 && (flags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) && !(...
1
CVE-2017-13040
2,281
vulnerable
CWE-125
name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) { int name_end = -1; int j = *idx; int ptr_count = 0; #define GET32(x) do { if (j + 4 > length) goto err; memcpy(&t32_, packet + j, 4); j += 4; x = ntohl(t32_); } while (0) #define GET16(x) do { if (j + 2 > length) goto err; memcpy(&t_, p...
0
CVE-2016-10195
2,220
benign
CWE-125
name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) { int name_end = -1; int j = *idx; int ptr_count = 0; #define GET32(x) do { if (j + 4 > length) goto err; memcpy(&t32_, packet + j, 4); j += 4; x = ntohl(t32_); } while (0) #define GET16(x) do { if (j + 2 > length) goto err; memcpy(&t_, p...
1
CVE-2016-10195
2,220
vulnerable
CWE-20
void beforeSleep(struct aeEventLoop *eventLoop) { REDIS_NOTUSED(eventLoop); listNode *ln; redisClient *c; /* Awake clients that got all the swapped keys they requested */ if (server.vm_enabled && listLength(server.io_ready_clients)) { listIter li; listRewind(server.io_ready_clients...
0
CVE-2013-0178
720
benign
CWE-20
void beforeSleep(struct aeEventLoop *eventLoop) { REDIS_NOTUSED(eventLoop); listNode *ln; redisClient *c; /* Awake clients that got all the on disk keys they requested */ if (server.ds_enabled && listLength(server.io_ready_clients)) { listIter li; listRewind(server.io_ready_clients...
1
CVE-2013-0178
720
vulnerable
CWE-119
safe_fprintf(FILE *f, const char *fmt, ...) { char fmtbuff_stack[256]; /* Place to format the printf() string. */ char outbuff[256]; /* Buffer for outgoing characters. */ char *fmtbuff_heap; /* If fmtbuff_stack is too small, we use malloc */ char *fmtbuff; /* Pointer to fmtbuff_stack or fmtbuff_heap. */ int fmtbu...
0
CVE-2016-8687
885
benign
CWE-119
safe_fprintf(FILE *f, const char *fmt, ...) { char fmtbuff_stack[256]; /* Place to format the printf() string. */ char outbuff[256]; /* Buffer for outgoing characters. */ char *fmtbuff_heap; /* If fmtbuff_stack is too small, we use malloc */ char *fmtbuff; /* Pointer to fmtbuff_stack or fmtbuff_heap. */ int fmtbu...
1
CVE-2016-8687
885
vulnerable
CWE-476
GlyphCache::GlyphCache(const Face & face, const uint32 face_options) : _glyph_loader(new Loader(face, bool(face_options & gr_face_dumbRendering))), _glyphs(_glyph_loader && *_glyph_loader && _glyph_loader->num_glyphs() ? grzeroalloc<const GlyphFace *>(_glyph_loader->num_glyphs()) : 0), _boxes(_glyph_loader ...
0
CVE-2018-7999
3,088
benign
CWE-476
GlyphCache::GlyphCache(const Face & face, const uint32 face_options) : _glyph_loader(new Loader(face)), _glyphs(_glyph_loader && *_glyph_loader && _glyph_loader->num_glyphs() ? grzeroalloc<const GlyphFace *>(_glyph_loader->num_glyphs()) : 0), _boxes(_glyph_loader && _glyph_loader->has_boxes() && _glyph_load...
1
CVE-2018-7999
3,088
vulnerable
CWE-119
void * pvPortMalloc( size_t xWantedSize ) { BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink; void * pvReturn = NULL; /* The heap must be initialised before the first call to * prvPortMalloc(). */ configASSERT( pxEnd ); vTaskSuspendAll(); { /* Check the reques...
0
CVE-2021-32020
1,535
benign
CWE-119
void * pvPortMalloc( size_t xWantedSize ) { BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink; void * pvReturn = NULL; /* The heap must be initialised before the first call to * prvPortMalloc(). */ configASSERT( pxEnd ); vTaskSuspendAll(); { /* Check the reques...
1
CVE-2021-32020
1,535
vulnerable
CWE-125
TfLiteStatus Prepare(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, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); output->type = i...
0
CVE-2020-15211
876
benign
CWE-125
TfLiteStatus Prepare(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, kInputTensor, &input)); TfLiteTensor* output; TF_LITE_ENSURE_OK(...
1
CVE-2020-15211
876
vulnerable
CWE-125
PJ_DEF(pj_status_t) pjmedia_rtcp_fb_build_pli( pjmedia_rtcp_session *session, void *buf, pj_size_t *length) { pjmedia_rtcp_common *hdr; unsigned len; PJ_ASSERT_RETURN(session && buf && length, PJ_EINVAL); len = 12; if (len > *length) return PJ_ETOOSMALL; /* Build RTCP-FB PLI ...
0
CVE-2022-24786
1,174
benign
CWE-125
PJ_DEF(pj_status_t) pjmedia_rtcp_fb_build_pli( pjmedia_rtcp_session *session, void *buf, pj_size_t *length) { pjmedia_rtcp_fb_common *hdr; unsigned len; PJ_ASSERT_RETURN(session && buf && length, PJ_EINVAL); len = 12; if (len > *length) return PJ_ETOOSMALL; /* Build RTCP-FB P...
1
CVE-2022-24786
1,174
vulnerable
CWE-362
static int bcm_release(struct socket *sock) { struct sock *sk = sock->sk; struct net *net; struct bcm_sock *bo; struct bcm_op *op, *next; if (!sk) return 0; net = sock_net(sk); bo = bcm_sk(sk); /* remove bcm_ops, timer, rx_unregister(), etc. */ spin_lock(&bcm_notifier_lock); while (bcm_busy_notifier == ...
0
CVE-2021-3609
3,035
benign
CWE-362
static int bcm_release(struct socket *sock) { struct sock *sk = sock->sk; struct net *net; struct bcm_sock *bo; struct bcm_op *op, *next; if (!sk) return 0; net = sock_net(sk); bo = bcm_sk(sk); /* remove bcm_ops, timer, rx_unregister(), etc. */ spin_lock(&bcm_notifier_lock); while (bcm_busy_notifier == ...
1
CVE-2021-3609
3,035
vulnerable
CWE-362
mptctl_eventreport (unsigned long arg) { struct mpt_ioctl_eventreport __user *uarg = (void __user *) arg; struct mpt_ioctl_eventreport karg; MPT_ADAPTER *ioc; int iocnum; int numBytes, maxEvents, max; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) { printk(KERN_ERR MYNAM "%s@%d...
0
CVE-2020-12652
809
benign
CWE-362
mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) { struct mpt_ioctl_eventreport __user *uarg = (void __user *) arg; struct mpt_ioctl_eventreport karg; int numBytes, maxEvents, max; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) { printk(KERN_ERR MYNAM "%s@%d::mptctl_eventrepor...
1
CVE-2020-12652
809
vulnerable
CWE-416
static GF_Err BM_ParseGlobalQuantizer(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list) { GF_Node *node; GF_Command *com; GF_CommandField *inf; node = gf_bifs_dec_node(codec, bs, NDT_SFWorldNode); if (!node) return GF_NON_COMPLIANT_BITSTREAM; /*reset global QP*/ if (codec->scenegraph->global_qp) { g...
0
CVE-2022-1795
3,186
benign
CWE-416
static GF_Err BM_ParseGlobalQuantizer(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list) { GF_Node *node; GF_Command *com; GF_CommandField *inf; node = gf_bifs_dec_node(codec, bs, NDT_SFWorldNode); if (!node) return GF_NON_COMPLIANT_BITSTREAM; /*reset global QP*/ if (codec->scenegraph->global_qp) { g...
1
CVE-2022-1795
3,186
vulnerable
CWE-125
struct r_bin_dyldcache_obj_t* r_bin_dyldcache_from_bytes_new(const ut8* buf, ut64 size) { struct r_bin_dyldcache_obj_t *bin; if (!(bin = malloc (sizeof (struct r_bin_dyldcache_obj_t)))) { return NULL; } memset (bin, 0, sizeof (struct r_bin_dyldcache_obj_t)); if (!buf) { return r_bin_dyldcache_free (bin); } b...
0
CVE-2018-20458
591
benign
CWE-125
struct r_bin_dyldcache_obj_t* r_bin_dyldcache_from_bytes_new(const ut8* buf, ut64 size) { struct r_bin_dyldcache_obj_t *bin = R_NEW0 (struct r_bin_dyldcache_obj_t); if (!bin) { return NULL; } if (!buf) { return r_bin_dyldcache_free (bin); } bin->b = r_buf_new (); if (!bin->b || !r_buf_set_bytes (bin->b, buf,...
1
CVE-2018-20458
591
vulnerable
CWE-362
mptctl_mpt_command (unsigned long arg) { struct mpt_ioctl_command __user *uarg = (void __user *) arg; struct mpt_ioctl_command karg; MPT_ADAPTER *ioc; int iocnum; int rc; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) { printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - " "Unable to ...
0
CVE-2020-12652
815
benign
CWE-362
mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) { struct mpt_ioctl_command __user *uarg = (void __user *) arg; struct mpt_ioctl_command karg; int rc; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) { printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - " "Unable to read in mpt_ioc...
1
CVE-2020-12652
815
vulnerable
CWE-20
int net_get(int s, void *arg, int *len) { struct net_hdr nh; int plen; if (net_read_exact(s, &nh, sizeof(nh)) == -1) { return -1; } plen = ntohl(nh.nh_len); if (!(plen <= *len)) printf("PLEN %d type %d len %d\n", plen, nh.nh_type, *len); assert(plen <= *len); /* XXX */ *len = plen; if ...
0
CVE-2014-8324
464
benign
CWE-20
int net_get(int s, void *arg, int *len) { struct net_hdr nh; int plen; if (net_read_exact(s, &nh, sizeof(nh)) == -1) { return -1; } plen = ntohl(nh.nh_len); if (!(plen <= *len)) printf("PLEN %d type %d len %d\n", plen, nh.nh_type, *len); assert(plen <= *len && plen > 0); /* XXX */ *len ...
1
CVE-2014-8324
464
vulnerable
CWE-125
ast_for_with_stmt(struct compiling *c, const node *n0, bool is_async) { const node * const n = is_async ? CHILD(n0, 1) : n0; int i, n_items, end_lineno, end_col_offset; asdl_seq *items, *body; REQ(n, with_stmt); n_items = (NCH(n) - 2) / 2; items = _Py_asdl_seq_new(n_items, c->c_arena); if ...
0
CVE-2019-19274
1,806
benign
CWE-125
ast_for_with_stmt(struct compiling *c, const node *n0, bool is_async) { const node * const n = is_async ? CHILD(n0, 1) : n0; int i, n_items, nch_minus_type, has_type_comment, end_lineno, end_col_offset; asdl_seq *items, *body; string type_comment; REQ(n, with_stmt); has_type_comment = TYPE(CHI...
1
CVE-2019-19274
1,806
vulnerable
CWE-119
unsigned long lh_char_hash(const void *k) { unsigned int h = 0; const char* data = (const char*)k; while( *data!=0 ) h = h*129 + (unsigned int)(*data++) + LH_PRIME; return h; }
0
CVE-2013-6370
238
benign
CWE-119
unsigned long lh_char_hash(const void *k) { static volatile int random_seed = -1; if (random_seed == -1) { int seed; /* we can't use -1 as it is the unitialized sentinel */ while ((seed = json_c_get_random_seed()) == -1); #if defined __GNUC__ __sync_val_compare_and_swap(&random_seed, -1, seed); #elif defined...
1
CVE-2013-6370
238
vulnerable
CWE-476
*/ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) { /* OBJECTS_FIXME */ zval **ent, *fname, **varname; zval *retval = NULL; const char *key; ulong idx; char tmp_buf[WDDX_BUF_LEN]; HashTable *objhash, *sleephash; TSRMLS_FETCH(); MAKE_STD_ZVAL(fname); ZVAL_STRING(fname, "__sleep", 1); ...
0
CVE-2016-9934
1,714
benign
CWE-476
*/ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) { /* OBJECTS_FIXME */ zval **ent, *fname, **varname; zval *retval = NULL; const char *key; ulong idx; char tmp_buf[WDDX_BUF_LEN]; HashTable *objhash, *sleephash; zend_class_entry *ce; PHP_CLASS_ATTRIBUTES; TSRMLS_FETCH(); PHP_SET_CLASS...
1
CVE-2016-9934
1,714
vulnerable
CWE-362
int PipeSocketHandler::connect(const SocketEndpoint& endpoint) { lock_guard<std::recursive_mutex> mutexGuard(globalMutex); string pipePath = endpoint.name(); sockaddr_un remote; int sockFd = ::socket(AF_UNIX, SOCK_STREAM, 0); FATAL_FAIL(sockFd); initSocket(sockFd); remote.sun_family = AF_UNIX; strcpy(...
0
CVE-2022-24949
1,771
benign
CWE-362
int PipeSocketHandler::connect(const SocketEndpoint& endpoint) { lock_guard<std::recursive_mutex> mutexGuard(globalMutex); string pipePath = endpoint.name(); sockaddr_un remote; int sockFd = ::socket(AF_UNIX, SOCK_STREAM, 0); FATAL_FAIL(sockFd); initSocket(sockFd); remote.sun_family = AF_UNIX; strncpy...
1
CVE-2022-24949
1,771
vulnerable
CWE-416
struct reloc_t* MACH0_(get_relocs)(struct MACH0_(obj_t)* bin) { struct reloc_t *relocs; int i = 0, len; ulebr ur = {NULL}; int wordsize = MACH0_(get_bits)(bin) / 8; if (bin->dyld_info) { ut8 *opcodes,*end, type = 0, rel_type = 0; int lib_ord, seg_idx = -1, sym_ord = -1; size_t j, count, skip, bind_size, lazy...
0
CVE-2017-7946
348
benign
CWE-416
struct reloc_t* MACH0_(get_relocs)(struct MACH0_(obj_t)* bin) { struct reloc_t *relocs; int i = 0, len; ulebr ur = {NULL}; int wordsize = MACH0_(get_bits)(bin) / 8; if (bin->dyld_info) { ut8 *opcodes,*end, type = 0, rel_type = 0; int lib_ord, seg_idx = -1, sym_ord = -1; size_t j, count, skip, bind_size, lazy...
1
CVE-2017-7946
348
vulnerable
CWE-416
static zend_always_inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend_long elements, int objprops) { while (elements-- > 0) { zval key, *data, d, *old_data; zend_ulong idx; ZVAL_UNDEF(&key); if (!php_var_unserialize_internal(&key, p, max, NULL, classes)) { zval_dtor(&key); return...
0
CVE-2017-12932
710
benign
CWE-416
static zend_always_inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend_long elements, int objprops) { while (elements-- > 0) { zval key, *data, d, *old_data; zend_ulong idx; ZVAL_UNDEF(&key); if (!php_var_unserialize_internal(&key, p, max, NULL, classes)) { zval_dtor(&key); return...
1
CVE-2017-12932
710
vulnerable
CWE-119
static ssize_t k90_show_current_profile(struct device *dev, struct device_attribute *attr, char *buf) { int ret; struct usb_interface *usbif = to_usb_interface(dev->parent); struct usb_device *usbdev = interface_to_usbdev(usbif); int current_profile; char data[8]; ret = usb_control_msg(usbdev, usb_rcvc...
0
CVE-2017-5547
263
benign
CWE-119
static ssize_t k90_show_current_profile(struct device *dev, struct device_attribute *attr, char *buf) { int ret; struct usb_interface *usbif = to_usb_interface(dev->parent); struct usb_device *usbdev = interface_to_usbdev(usbif); int current_profile; char *data; data = kmalloc(8, GFP_KERNEL); if (!dat...
1
CVE-2017-5547
263
vulnerable
CWE-362
int ip_queue_xmit(struct sk_buff *skb) { struct sock *sk = skb->sk; struct inet_sock *inet = inet_sk(sk); struct ip_options *opt = inet->opt; struct rtable *rt; struct iphdr *iph; int res; /* Skip all of this if the packet is already routed, * f.e. by something like SCTP. */ rcu_read_lock(); rt = skb_rtab...
0
CVE-2012-3552
2,842
benign
CWE-362
int ip_queue_xmit(struct sk_buff *skb) { struct sock *sk = skb->sk; struct inet_sock *inet = inet_sk(sk); struct ip_options_rcu *inet_opt; struct rtable *rt; struct iphdr *iph; int res; /* Skip all of this if the packet is already routed, * f.e. by something like SCTP. */ rcu_read_lock(); inet_opt = rcu_d...
1
CVE-2012-3552
2,842
vulnerable
CWE-20
static void keyring_describe(const struct key *keyring, struct seq_file *m) { if (keyring->description) seq_puts(m, keyring->description); else seq_puts(m, "[anon]"); if (key_is_instantiated(keyring)) { if (keyring->keys.nr_leaves_on_tree != 0) seq_printf(m, ": %lu", keyring->keys.nr_leaves_on_tree); els...
0
CVE-2017-15951
2,099
benign
CWE-20
static void keyring_describe(const struct key *keyring, struct seq_file *m) { if (keyring->description) seq_puts(m, keyring->description); else seq_puts(m, "[anon]"); if (key_is_positive(keyring)) { if (keyring->keys.nr_leaves_on_tree != 0) seq_printf(m, ": %lu", keyring->keys.nr_leaves_on_tree); else ...
1
CVE-2017-15951
2,099
vulnerable
CWE-476
GF_Err ilst_item_box_read(GF_Box *s,GF_BitStream *bs) { GF_Err e; u32 sub_type; GF_Box *a = NULL; GF_ListItemBox *ptr = (GF_ListItemBox *)s; /*iTunes way: there's a data atom containing the data*/ sub_type = gf_bs_peek_bits(bs, 32, 4); if (sub_type == GF_ISOM_BOX_TYPE_DATA ) { e = gf_isom_box_parse(&a, bs); ...
0
CVE-2020-19488
407
benign
CWE-476
GF_Err ilst_item_box_read(GF_Box *s,GF_BitStream *bs) { GF_Err e; u32 sub_type; GF_Box *a = NULL; GF_ListItemBox *ptr = (GF_ListItemBox *)s; /*iTunes way: there's a data atom containing the data*/ sub_type = gf_bs_peek_bits(bs, 32, 4); if (sub_type == GF_ISOM_BOX_TYPE_DATA ) { e = gf_isom_box_parse(&a, bs); ...
1
CVE-2020-19488
407
vulnerable
CWE-20
static int cmd_handle_untagged (IMAP_DATA* idata) { char* s; char* pn; unsigned int count; s = imap_next_word (idata->buf); pn = imap_next_word (s); if ((idata->state >= IMAP_SELECTED) && isdigit ((unsigned char) *s)) { pn = s; s = imap_next_word (s); /* EXISTS and EXPUNGE are always relate...
0
CVE-2018-14349
929
benign
CWE-20
static int cmd_handle_untagged (IMAP_DATA* idata) { char* s; char* pn; unsigned int count; s = imap_next_word (idata->buf); pn = imap_next_word (s); if ((idata->state >= IMAP_SELECTED) && isdigit ((unsigned char) *s)) { pn = s; s = imap_next_word (s); /* EXISTS and EXPUNGE are always relate...
1
CVE-2018-14349
929
vulnerable
CWE-119
void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartcol; /* Get a buffer. *...
0
CVE-2016-8654
2,141
benign
CWE-119
void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartrow; /* Get a buffer. *...
1
CVE-2016-8654
2,141
vulnerable
CWE-20
jas_image_t *jas_image_create0() { jas_image_t *image; if (!(image = jas_malloc(sizeof(jas_image_t)))) { return 0; } image->tlx_ = 0; image->tly_ = 0; image->brx_ = 0; image->bry_ = 0; image->clrspc_ = JAS_CLRSPC_UNKNOWN; image->numcmpts_ = 0; image->maxcmpts_ = 0; image->cmpts_ = 0; image->inmem_ = tru...
0
CVE-2016-9395
2,980
benign
CWE-20
jas_image_t *jas_image_create0() { jas_image_t *image; if (!(image = jas_malloc(sizeof(jas_image_t)))) { return 0; } image->tlx_ = 0; image->tly_ = 0; image->brx_ = 0; image->bry_ = 0; image->clrspc_ = JAS_CLRSPC_UNKNOWN; image->numcmpts_ = 0; image->maxcmpts_ = 0; image->cmpts_ = 0; // image->inmem_ = t...
1
CVE-2016-9395
2,980
vulnerable
CWE-476
static int f2fs_read_single_page(struct inode *inode, struct page *page, unsigned nr_pages, struct f2fs_map_blocks *map, struct bio **bio_ret, sector_t *last_block_in_bio, bool is_readahead) { struct bio *bio = *bio_ret; const unsigned blkbits = inode->i_blkbits; const unsigned blocksize = 1...
0
CVE-2019-19815
2,104
benign
CWE-476
static int f2fs_read_single_page(struct inode *inode, struct page *page, unsigned nr_pages, struct f2fs_map_blocks *map, struct bio **bio_ret, sector_t *last_block_in_bio, bool is_readahead) { struct bio *bio = *bio_ret; const unsigned blkbits = inode->i_blkbits; const unsigned blocksize = 1...
1
CVE-2019-19815
2,104
vulnerable
CWE-125
TfLiteStatus ResizeOutput(TfLiteContext* context, TfLiteNode* node) { TfLiteIntArray* output_shape = GetOutputShape(context, node); std::unique_ptr<TfLiteIntArray, void (*)(TfLiteIntArray*)> scoped_output_shape(output_shape, TfLiteIntArrayFree); const TfLiteTensor* input = GetInput(context, node, kInputTen...
0
CVE-2020-15211
1,117
benign
CWE-125
TfLiteStatus ResizeOutput(TfLiteContext* context, TfLiteNode* node) { TfLiteIntArray* output_shape = GetOutputShape(context, node); std::unique_ptr<TfLiteIntArray, void (*)(TfLiteIntArray*)> scoped_output_shape(output_shape, TfLiteIntArrayFree); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetIn...
1
CVE-2020-15211
1,117
vulnerable
CWE-125
TfLiteStatus NonMaxSuppressionSingleClassHelper( TfLiteContext* context, TfLiteNode* node, OpData* op_data, const std::vector<float>& scores, std::vector<int>* selected, int max_detections) { const TfLiteTensor* input_box_encodings = GetInput(context, node, kInputTensorBoxEncodings); const TfLiteT...
0
CVE-2020-15211
2,084
benign
CWE-125
TfLiteStatus NonMaxSuppressionSingleClassHelper( TfLiteContext* context, TfLiteNode* node, OpData* op_data, const std::vector<float>& scores, std::vector<int>* selected, int max_detections) { const TfLiteTensor* input_box_encodings; TF_LITE_ENSURE_OK(context, GetInputSafe(context, no...
1
CVE-2020-15211
2,084
vulnerable
CWE-190
static int parse_exports_table(long long *table_start) { int res; int indexes = SQUASHFS_LOOKUP_BLOCKS(sBlk.s.inodes); long long export_index_table[indexes]; res = read_fs_bytes(fd, sBlk.s.lookup_table_start, SQUASHFS_LOOKUP_BLOCK_BYTES(sBlk.s.inodes), export_index_table); if(res == FALSE) { ERROR("parse_expo...
0
CVE-2015-4645
2,838
benign
CWE-190
static int parse_exports_table(long long *table_start) { /* * Note on overflow limits: * Size of SBlk.s.inodes is 2^32 (unsigned int) * Max indexes is (2^32*8)/8K or 2^22 * Max length is ((2^32*8)/8K)*8 or 2^25 */ int res; int indexes = SQUASHFS_LOOKUP_BLOCKS((long long) sBlk.s.inodes); int length = SQUAS...
1
CVE-2015-4645
2,838
vulnerable
CWE-416
*/ static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) { struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer); struct bfq_queue *bfqq = bfqd->in_service_queue; /* * Theoretical race here: the in-service queue can be NULL or * different from the queue that...
0
CVE-2020-12657
3,085
benign
CWE-416
*/ static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) { struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer); struct bfq_queue *bfqq = bfqd->in_service_queue; /* * Theoretical race here: the in-service queue can be NULL or * different from the queue that...
1
CVE-2020-12657
3,085
vulnerable
CWE-125
TfLiteStatus Rfft2dHelper(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, kInputTensor); const float* input_data = GetTensorData<float>(input); const TfLiteTensor* fft_length = GetInput(context, node, kFftLengthTensor); const int32_t* fft_length_data = GetTensorDa...
0
CVE-2020-15211
1,867
benign
CWE-125
TfLiteStatus Rfft2dHelper(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input)); const float* input_data = GetTensorData<float>(input); const TfLiteTensor* fft_length; TF_LITE_ENSURE_OK(context, ...
1
CVE-2020-15211
1,867
vulnerable
CWE-125
GF_Err sgpd_dump(GF_Box *a, FILE * trace) { u32 i; GF_SampleGroupDescriptionBox *ptr = (GF_SampleGroupDescriptionBox*) a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "SampleGroupDescriptionBox", trace); if (ptr->grouping_type) fprintf(trace, "grouping_type=\"%s\"", gf_4cc_to_str(ptr->grouping_type) ...
0
CVE-2018-13006
2,114
benign
CWE-125
GF_Err sgpd_dump(GF_Box *a, FILE * trace) { u32 i; GF_SampleGroupDescriptionBox *ptr = (GF_SampleGroupDescriptionBox*) a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "SampleGroupDescriptionBox", trace); if (ptr->grouping_type) fprintf(trace, "grouping_type=\"%s\"", gf_4cc_to_str(ptr->grouping_type) ...
1
CVE-2018-13006
2,114
vulnerable
CWE-125
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteDivParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 2); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTens...
0
CVE-2020-15211
2,516
benign
CWE-125
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteDivParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 2); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTens...
1
CVE-2020-15211
2,516
vulnerable
CWE-125
std::pair<Function *, Function *> ESTreeIRGen::doLazyFunction( hbc::LazyCompilationData *lazyData) { // Create a top level function that will never be executed, because: // 1. IRGen assumes the first function always has global scope // 2. It serves as the root for dummy functions for lexical data Function *...
0
CVE-2020-1912
1,034
benign
CWE-125
std::pair<Function *, Function *> ESTreeIRGen::doLazyFunction( hbc::LazyCompilationData *lazyData) { // Create a top level function that will never be executed, because: // 1. IRGen assumes the first function always has global scope // 2. It serves as the root for dummy functions for lexical data Function *...
1
CVE-2020-1912
1,034
vulnerable
CWE-125
get_lisp_indent(void) { pos_T *pos, realpos, paren; int amount; char_u *that; colnr_T col; colnr_T firsttry; int parencount, quotecount; int vi_lisp; // Set vi_lisp to use the vi-compatible method vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL); realpos = curwin->w_cursor; ...
0
CVE-2022-2183
1,131
benign
CWE-125
get_lisp_indent(void) { pos_T *pos, realpos, paren; int amount; char_u *that; colnr_T col; colnr_T firsttry; int parencount, quotecount; int vi_lisp; // Set vi_lisp to use the vi-compatible method vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL); realpos = curwin->w_cursor; ...
1
CVE-2022-2183
1,131
vulnerable
CWE-119
static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { struct lg_drv_data *drv_data = hid_get_drvdata(hdev); struct usb_device_descriptor *udesc; __u16 bcdDevice, rev_maj, rev_min; if ((drv_data->quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 && rdesc[84] == 0x8c &&...
0
CVE-2014-3184
267
benign
CWE-119
static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { struct lg_drv_data *drv_data = hid_get_drvdata(hdev); struct usb_device_descriptor *udesc; __u16 bcdDevice, rev_maj, rev_min; if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 && rdesc[84] == 0x8c &&...
1
CVE-2014-3184
267
vulnerable
CWE-20
int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct ipv6_pinfo *np = inet6_sk(sk); struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDP...
0
CVE-2013-7263
1,981
benign
CWE-20
int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct ipv6_pinfo *np = inet6_sk(sk); struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDP...
1
CVE-2013-7263
1,981
vulnerable
CWE-125
ast_for_expr(struct compiling *c, const node *n) { /* handle the full range of simple expressions test: or_test ['if' or_test 'else' test] | lambdef test_nocond: or_test | lambdef_nocond or_test: and_test ('or' and_test)* and_test: not_test ('and' not_test)* not_test: 'not' not_te...
0
CVE-2019-19274
2,604
benign
CWE-125
ast_for_expr(struct compiling *c, const node *n) { /* handle the full range of simple expressions test: or_test ['if' or_test 'else' test] | lambdef test_nocond: or_test | lambdef_nocond or_test: and_test ('or' and_test)* and_test: not_test ('and' not_test)* not_test: 'not' not_te...
1
CVE-2019-19274
2,604
vulnerable
CWE-476
void Context::onDone() { if (wasm_->onDone_) { wasm_->onDone_(this, id_); } }
0
CVE-2020-10739
1,633
benign
CWE-476
void Context::onDone() { if (in_vm_context_created_ && wasm_->onDone_) { wasm_->onDone_(this, id_); } }
1
CVE-2020-10739
1,633
vulnerable
CWE-787
FdInStream::FdInStream(int fd_, FdInStreamBlockCallback* blockCallback_, int bufSize_) : fd(fd_), timeoutms(0), blockCallback(blockCallback_), timing(false), timeWaitedIn100us(5), timedKbits(0), bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0) { ptr = end = start = new U8[bu...
0
CVE-2019-15694
1,107
benign
CWE-787
FdInStream::FdInStream(int fd_, int timeoutms_, size_t bufSize_, bool closeWhenDone_) : fd(fd_), closeWhenDone(closeWhenDone_), timeoutms(timeoutms_), blockCallback(0), timing(false), timeWaitedIn100us(5), timedKbits(0), bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0) { ...
1
CVE-2019-15694
1,107
vulnerable
CWE-20
static int try_read_command(conn *c) { assert(c != NULL); assert(c->rcurr <= (c->rbuf + c->rsize)); assert(c->rbytes > 0); if (c->protocol == negotiating_prot || c->transport == udp_transport) { if ((unsigned char)c->rbuf[0] == (unsigned char)PROTOCOL_BINARY_REQ) { c->protocol = bi...
0
CVE-2010-1152
847
benign
CWE-20
static int try_read_command(conn *c) { assert(c != NULL); assert(c->rcurr <= (c->rbuf + c->rsize)); assert(c->rbytes > 0); if (c->protocol == negotiating_prot || c->transport == udp_transport) { if ((unsigned char)c->rbuf[0] == (unsigned char)PROTOCOL_BINARY_REQ) { c->protocol = bi...
1
CVE-2010-1152
847
vulnerable
CWE-787
exif_data_load_data_entry (ExifData *data, ExifEntry *entry, const unsigned char *d, unsigned int size, unsigned int offset) { unsigned int s, doff; entry->tag = exif_get_short (d + offset + 0, data->priv->order); entry->format = exif_get_short (d + offset + 2, data->priv->order); entry->com...
0
CVE-2019-9278
2,252
benign
CWE-787
exif_data_load_data_entry (ExifData *data, ExifEntry *entry, const unsigned char *d, unsigned int size, unsigned int offset) { unsigned int s, doff; entry->tag = exif_get_short (d + offset + 0, data->priv->order); entry->format = exif_get_short (d + offset + 2, data->priv->order); entry->com...
1
CVE-2019-9278
2,252
vulnerable
CWE-20
int treeRead(struct READER *reader, struct DATAOBJECT *data) { int i, j, err, olen, elements, size, x, y, z, b, e, dy, dz, sx, sy, sz, dzy, szy; char *input, *output; uint8_t node_type, node_level; uint16_t entries_used; uint32_t size_of_chunk; uint32_t filter_mask; uint64_t address_of_left_sibling, address_...
0
CVE-2019-10672
2,042
benign
CWE-20
int treeRead(struct READER *reader, struct DATAOBJECT *data) { int i, j, err, olen, elements, size, x, y, z, b, e, dy, dz, sx, sy, sz, dzy, szy; char *input, *output; uint8_t node_type, node_level; uint16_t entries_used; uint32_t size_of_chunk; uint32_t filter_mask; uint64_t address_of_left_sibling, address_...
1
CVE-2019-10672
2,042
vulnerable
CWE-476
long keyctl_update_key(key_serial_t id, const void __user *_payload, size_t plen) { key_ref_t key_ref; void *payload; long ret; ret = -EINVAL; if (plen > PAGE_SIZE) goto error; /* pull the payload in if one was supplied */ payload = NULL; if (_payload) { ret = -ENOMEM; payload = kmallo...
0
CVE-2017-15274
234
benign
CWE-476
long keyctl_update_key(key_serial_t id, const void __user *_payload, size_t plen) { key_ref_t key_ref; void *payload; long ret; ret = -EINVAL; if (plen > PAGE_SIZE) goto error; /* pull the payload in if one was supplied */ payload = NULL; if (plen) { ret = -ENOMEM; payload = kmalloc(pl...
1
CVE-2017-15274
234
vulnerable