context large_stringlengths 383 16.5k | cve large_stringclasses 1
value | cwe large_stringclasses 13
values | id large_stringlengths 1 4 | label large_stringclasses 1
value | source large_stringlengths 48 234k |
|---|---|---|---|---|---|
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1400 | true | static unsigned long get_ctl_id_hash(const struct snd_ctl_elem_id *id)
{
int i;
unsigned long h;
h = id->iface;
h = MULTIPLIER * h + id->device;
h = MULTIPLIER * h + id->subdevice;
for (i = 0; id->name[i] && i < SNDRV_CTL_ELEM_ID_NAME_MAXLEN; i++)
h = MULTIPLIER * h + id->name[i];
h = MULTIPLIER * h + id->ind... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1401 | true | int snd_timer_open(struct snd_timer_instance **ti,
char *owner, struct snd_timer_id *tid,
unsigned int slave_id)
{
struct snd_timer *timer;
struct snd_timer_instance *timeri = NULL;
struct device *card_dev_to_put = NULL;
int err;
mutex_lock(®ister_mutex);
if (tid->dev_class == SNDRV_TIMER_CLASS_SLAV... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1402 | true | bmexec_trans (kwset_t kwset, char const *text, size_t size)
{
unsigned char const *d1;
char const *ep, *sp, *tp;
int d;
int len = kwset->mind;
char const *trans = kwset->trans;
if (len == 0)
return 0;
if (len > size)
return -1;
if (len == 1)
{
tp = memchr_kwset (text, size, kwset);
... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1403 | true | png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
int num)
{
png_debug(1, "in png_free_data");
if (png_ptr == NULL || info_ptr == NULL)
return;
#ifdef PNG_TEXT_SUPPORTED
/* Free text item num or (if num == -1) all text items */
if (info_ptr->text != NULL &&
... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1404 | true | static bool parse_reconnect(struct pool *pool, json_t *val)
{
char *sockaddr_url, *stratum_port, *tmp;
char *url, *port, address[256];
memset(address, 0, 255);
url = (char *)json_string_value(json_array_get(val, 0));
if (!url)
url = pool->sockaddr_url;
else {
char *dot_pool, *dot_reconnect;
dot_pool = strc... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1405 | true | void Compute(OpKernelContext *ctx) override {
const Tensor *indices_t, *values_t, *shape_t, *reduction_axes_t;
OP_REQUIRES_OK(ctx, ctx->input("input_indices", &indices_t));
OP_REQUIRES_OK(ctx, ctx->input("input_values", &values_t));
OP_REQUIRES_OK(ctx, ctx->input("input_shape", &shape_t));
OP_REQU... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1406 | true | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output));
TfLiteTensor* hits;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 1, &hits));
const TfLiteTensor* lookup;
TF_LITE_ENSURE_OK(context, GetInputSaf... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1407 | true | Pl_ASCII85Decoder::flush()
{
if (this->pos == 0)
{
QTC::TC("libtests", "Pl_ASCII85Decoder no-op flush");
return;
}
unsigned long lval = 0;
for (int i = 0; i < 5; ++i)
{
lval *= 85;
lval += (this->inbuf[i] - 33U);
}
unsigned char outbuf[4];
memset(outbuf, 0, 4);
for (int i = ... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1408 | true | vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
struct VhostUserMsg *msg)
{
uint16_t vring_idx;
switch (msg->request.master) {
case VHOST_USER_SET_VRING_KICK:
case VHOST_USER_SET_VRING_CALL:
case VHOST_USER_SET_VRING_ERR:
vring_idx = msg->payload.u64 & VHOST_USER_VRING_IDX_MASK;
break;
case ... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1409 | true | RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) {
RList *segments = bin->segments;
if (!segments) {
return NULL;
}
RList *entries = bin->entries;
if (!entries) {
return NULL;
}
RList *symbols = bin->symbols;
if (!symbols) {
return NULL;
}
ut16 *modref = calloc (bin->ne_header->ModRefs, sizeof (ut16));
... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1410 | true | static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl,
unsigned char **p,
unsigned char *end )
{
int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
size_t len;
((void) ssl);
/*
* PSK parameters:
*
* opaque ... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1411 | true | static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
buffer[MagickPathExtent],
format,
magick[MagickPathExtent];
const char
*value;
MagickBooleanType
status;
MagickOffsetType
scene;
Quantum
index;
QuantumAny
... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1412 | true | int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error)
return error;
/* Enforce stack_guard_gap */
prev = vma->vm_prev;
/* Check... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1413 | true | static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id)
{
struct snd_msnd *chip = dev_id;
void *pwDSPQData = chip->mappedbase + DSPQ_DATA_BUFF;
/* Send ack to DSP */
/* inb(chip->io + HP_RXL); */
/* Evaluate queued DSP messages */
while (readw(chip->DSPQ + JQS_wTail) != readw(chip->DSPQ + JQS_wHead... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1414 | true | void Compute(OpKernelContext* ctx) override {
const Tensor& shape_t = ctx->input(0);
const Tensor& alpha_t = ctx->input(1);
OP_REQUIRES(ctx,
TensorShapeUtils::IsVector(shape_t.shape()) &&
(shape_t.dtype() == DataType::DT_INT32 ||
shape_t.dtype() ==... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1415 | true | Status GetDeviceForInput(const EagerOperation& op, const EagerContext& ctx,
TensorHandle* tensor_handle, Device** result) {
Device* cpu_device = ctx.HostCPU();
string device_name;
if (tensor_handle->Type() != TensorHandle::LOCAL) {
Device* device = tensor_handle->device();
device_... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1416 | true | do_uncompress( compress_filter_context_t *zfx, z_stream *zs,
IOBUF a, size_t *ret_len )
{
int zrc;
int rc=0;
size_t n;
int nread, count;
int refill = !zs->avail_in;
if( DBG_FILTER )
log_debug("begin inflate: avail_in=%u, avail_out=%u, inbuf=%u\n",
(unsigned)zs->avail_in, (unsigned)zs... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1417 | true | static void InsertRow(Image *image,unsigned char *p,ssize_t y,int bpp,
ExceptionInfo *exception)
{
int
bit;
Quantum
index;
register Quantum
*q;
ssize_t
x;
switch (bpp)
{
case 1: /* Convert bitmap scanline. */
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exce... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1418 | true | int ff_mms_asf_header_parser(MMSContext *mms)
{
uint8_t *p = mms->asf_header;
uint8_t *end;
int flags, stream_id;
mms->stream_num = 0;
if (mms->asf_header_size < sizeof(ff_asf_guid) * 2 + 22 ||
memcmp(p, ff_asf_header, sizeof(ff_asf_guid))) {
av_log(NULL, AV_LOG_ERROR,
... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1419 | true | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
OpData* op_data = reinterpret_cast<OpData*>(node->user_data);
int num_inputs = node->inputs->size;
// The number of outputs should be the same as number of inputs.
TF_LITE_ENSURE_EQ(context, node->outputs->size, num_inputs);
// Check subgraph i... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1420 | true | int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_size) {
... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1421 | true | cif_print_page(gx_device_printer *pdev, gp_file *prn_stream)
{ int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev);
int lnum;
byte *in = (byte *)gs_malloc(pdev->memory, line_size, 1, "cif_print_page(in)");
char *s;
int scanline, scanbyte;
int length, start; /* length ... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1422 | true | static int gtco_probe(struct usb_interface *usbinterface,
const struct usb_device_id *id)
{
struct gtco *gtco;
struct input_dev *input_dev;
struct hid_descriptor *hid_desc;
char *report;
int result = 0, retry;
int error;
struct usb_endpoint_d... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1423 | true | void CreateAuthenticatorFactory() {
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
std::string local_certificate = key_pair_.GenerateCertificate();
if (local_certificate.empty()) {
LOG(ERROR) << "Failed to generate host certificate.";
Shutdown(kHostInitializationFail... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1424 | true | int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_i915_gem_context_destroy *args = data;
struct drm_i915_file_private *file_priv = file->driver_priv;
struct i915_gem_context *ctx;
int ret;
if (args->pad != 0)
return -EINVAL;
if (args->ctx_id == D... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1425 | true | new_msg_register_event (u_int32_t seqnum, struct lsa_filter_type *filter)
{
u_char buf[OSPF_API_MAX_MSG_SIZE];
struct msg_register_event *emsg;
int len;
emsg = (struct msg_register_event *) buf;
len = sizeof (struct msg_register_event) +
filter->num_areas * sizeof (struct in_addr);
emsg->filter.typema... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1426 | true | void MemBackendImpl::EvictIfNeeded() {
if (current_size_ <= max_size_)
return;
int target_size = std::max(0, max_size_ - kDefaultEvictionSize);
base::LinkNode<MemEntryImpl>* entry = lru_list_.head();
while (current_size_ > target_size && entry != lru_list_.end()) {
MemEntryImpl* to_doom = entry->va... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1427 | true | static const struct usb_cdc_union_desc *
ims_pcu_get_cdc_union_desc(struct usb_interface *intf)
{
const void *buf = intf->altsetting->extra;
size_t buflen = intf->altsetting->extralen;
struct usb_cdc_union_desc *union_desc;
if (!buf) {
dev_err(&intf->dev, "Missing descriptor data\n");
return NULL;
}
if (!bu... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1428 | true | dbd_st_fetch(SV *sth, imp_sth_t* imp_sth)
{
dTHX;
int num_fields, ChopBlanks, i, rc;
unsigned long *lengths;
AV *av;
int av_length, av_readonly;
MYSQL_ROW cols;
D_imp_dbh_from_sth;
MYSQL* svsock= imp_dbh->pmysql;
imp_sth_fbh_t *fbh;
D_imp_xxh(sth);
#if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
MYS... | |
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "tensorflow", "commit_message": "Prevent heap oob access in `resource_variable_ops.cc`\n\nPiperOrigin-RevId: 3879364... | CWE-369 | 1429 | true | void Compute(OpKernelContext* c) override {
core::RefCountPtr<Var> v;
OP_REQUIRES_OK(c, LookupResource(c, HandleFromInput(c, 0), &v));
OP_REQUIRES_OK(c, EnsureSparseVariableAccess<Device, T>(c, v.get()));
// NOTE: We hold the lock for the whole gather operation instead
// of increasing the referen... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1430 | true | void process_packet_tail(struct msg_digest *md)
{
struct state *st = md->st;
enum state_kind from_state = md->v1_from_state;
const struct state_v1_microcode *smc = md->smc;
bool new_iv_set = md->new_iv_set;
bool self_delete = FALSE;
if (md->hdr.isa_flags & ISAKMP_FLAGS_v1_ENCRYPTION) {
endpoint_buf b;
dbg("r... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1431 | true | static boolean parse_identifier( const char **pcur, char *ret )
{
const char *cur = *pcur;
int i = 0;
if (is_alpha_underscore( cur )) {
ret[i++] = *cur++;
while (is_alpha_underscore( cur ) || is_digit( cur ))
ret[i++] = *cur++;
ret[i++] = '\0';
*pcur = cur;
retur... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1432 | true | bgp_attr_print(netdissect_options *ndo,
u_int atype, const u_char *pptr, u_int len)
{
int i;
uint16_t af;
uint8_t safi, snpa, nhlen;
union { /* copy buffer for bandwidth values */
float f;
uint32_t i;
} bw;
int advance;
u_int tlen;
const u_char *tptr;
char b... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1433 | true | void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
YV12_BUFFER_CONFIG *post, int q, int low_var_thresh,
int flag) {
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
int ppl = (int)(level + .5);
const MODE_INFO *mode_info_context = cm->show_frame_m... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1434 | true | int PDFiumEngine::GetMostVisiblePage() {
if (in_flight_visible_page_)
return *in_flight_visible_page_;
CalculateVisiblePages();
return most_visible_page_;
}
| |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1435 | true | status_t BnOMX::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case LIVES_LOCALLY:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
pid_t pid = (pid_t)data.readInt32();
reply->writeInt32(livesLoc... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1436 | true | bool SubsetterImpl::ResolveCompositeGlyphs(const unsigned int* glyph_ids,
size_t glyph_count,
IntegerSet* glyph_id_processed) {
if (glyph_ids == NULL || glyph_count == 0 || glyph_id_processed == NULL) {
return false;
}
Glyp... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1437 | true | gnutls_session_get_data (gnutls_session_t session,
void *session_data, size_t * session_data_size)
{
gnutls_datum_t psession;
int ret;
if (session->internals.resumable == RESUME_FALSE)
return GNUTLS_E_INVALID_SESSION;
psession.data = session_data;
ret = _gnutls_session_pack (s... | |
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "libvncserver", "commit_message": "libvncserver/rfbserver: fix possible divide-by-zero\n\nCloses #409", "cve": "CVE-... | CWE-369 | 1438 | true | rfbSendRectEncodingRaw(rfbClientPtr cl,
int x,
int y,
int w,
int h)
{
rfbFramebufferUpdateRectHeader rect;
int nlines;
int bytesPerLine = w * (cl->format.bitsPerPixel / 8);
char *fbptr = (cl->scaledScreen->frameB... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1439 | true | cvtchar(register const char *sp)
/* convert a character to a terminfo push */
{
unsigned char c = 0;
int len;
switch (*sp) {
case '\\':
switch (*++sp) {
case '\'':
case '$':
case '\\':
case '%':
c = UChar(*sp);
len = 2;
break;
case '\0':
c = '\\';
len = 1;
break;
ca... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1440 | true | ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
const char **elem_rtrn, const char **field_rtrn,
ExprDef **index_rtrn)
{
switch (expr->expr.op) {
case EXPR_IDENT:
*elem_rtrn = NULL;
*field_rtrn = xkb_atom_text(ctx, expr->ident.ident);
*index_... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1441 | true | static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)
{
if (s->ds->dpy_copy) {
cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,
s->cirrus_blt_srcaddr - s->start_addr,
s->cirrus_blt_width, s->cirrus_blt_height);
} else {
if (BLTUNSAFE(s))
return 0;
(*s->cirrus_r... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1442 | true | static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
int len, i, ret = 0;
QCowHeader header;
QemuOpts *opts;
Error *local_err = NULL;
uint64_t ext_end;
uint64_t l1_vm_state_index;
const char *opt_overl... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1443 | true | apr_status_t modsecurity_tx_init(modsec_rec *msr) {
const char *s = NULL;
const apr_array_header_t *arr;
char *semicolon = NULL;
char *comma = NULL;
apr_table_entry_t *te;
int i;
/* Register TX cleanup */
apr_pool_cleanup_register(msr->mp, msr, modsecurity_tx_cleanup, apr_pool_cleanup_n... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1444 | true | ins_compl_add(
char_u *str,
int len,
char_u *fname,
char_u **cptext, // extra text for popup menu or NULL
typval_T *user_data UNUSED, // "user_data" entry or NULL
int cdir,
int flags_arg,
int adup) // accept duplicate match
{
compl_T *match;
int dir = (cdir == 0 ? comp... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1445 | true | 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);
... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1446 | true | static x86newTokenType getToken(const char *str, size_t *begin, size_t *end) {
// Skip whitespace
while (begin && isspace ((ut8)str[*begin])) {
++(*begin);
}
if (!str[*begin]) { // null byte
*end = *begin;
return TT_EOF;
} else if (isalpha ((ut8)str[*begin])) { // word token
*end = *begin... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1447 | true | static int encrypt(struct blkcipher_desc *desc,
struct scatterlist *dst, struct scatterlist *src,
unsigned int nbytes)
{
struct blkcipher_walk walk;
struct crypto_blkcipher *tfm = desc->tfm;
struct salsa20_ctx *ctx = crypto_blkcipher_ctx(tfm);
int err;
blkcipher_walk_init(&walk, dst, src, nbytes);
err ... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1448 | true | static blink::WebScreenOrientations stringToOrientations(const AtomicString& orientationString)
{
DEFINE_STATIC_LOCAL(const AtomicString, portrait, ("portrait", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(const AtomicString, landscape, ("landscape", AtomicString::ConstructFromLiteral));
... | |
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi... | CWE-200 | 1449 | true | xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
/*
xmlInitParser();
*/
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
if (ctxt) {
zend_bool old;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
ctxt->sax->comment = soap_Comment;
c... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1450 | true | void rfc_process_mx_message(tRFC_MCB* p_mcb, BT_HDR* p_buf) {
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
MX_FRAME* p_rx_frame = &rfc_cb.rfc.rx_frame;
uint16_t length = p_buf->len;
uint8_t ea, cr, mx_len;
bool is_command;
p_rx_frame->ea = *p_data & RFCOMM_EA;
p_rx_frame->cr = (*p_data & ... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1451 | true | read_attribute(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr,
int name_size)
{
const byte *p;
byte *buf;
size_t len, nread;
cdk_error_t rc;
if (!inp || !attr || !pktlen)
return CDK_Inv_Value;
if (DEBUG_PKT)
_gnutls_write_log("read_attribute: %d octets\n",
(int) pktlen);
_gnutls_str_... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1452 | true | static int jpc_pi_nextcprl(register jpc_pi_t *pi)
{
int rlvlno;
jpc_pirlvl_t *pirlvl;
jpc_pchg_t *pchg;
int prchind;
int prcvind;
int *prclyrno;
uint_fast32_t trx0;
uint_fast32_t try0;
uint_fast32_t r;
uint_fast32_t rpx;
uint_fast32_t rpy;
pchg = pi->pchg;
if (!pi->prgvolfirst) {
goto skip;
} else {
... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1453 | true | METHODDEF(JDIMENSION)
get_8bit_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading 8-bit colormap indexes */
{
bmp_source_ptr source = (bmp_source_ptr)sinfo;
register JSAMPARRAY colormap = source->colormap;
JSAMPARRAY image_ptr;
register int t;
register JSAMPROW inptr, outpt... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1454 | true | inline void* Zone::New(int size) {
ASSERT(scope_nesting_ > 0);
// Round up the requested size to fit the alignment.
size = RoundUp(size, kAlignment);
// If the allocation size is divisible by 8 then we return an 8-byte aligned
// address.
if (kPointerSize == 4 && kAlignment == 4) {
position_ += ((~size... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1455 | true | AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream& stream,
AP4_UI32 type,
AP4_UI32 size_32,
AP4_UI64 size_64,
AP4_Atom*& atom)
{
bool ... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1456 | true | static int ati_remote2_probe(struct usb_interface *interface, const struct usb_device_id *id)
{
struct usb_device *udev = interface_to_usbdev(interface);
struct usb_host_interface *alt = interface->cur_altsetting;
struct ati_remote2 *ar2;
int r;
if (alt->desc.bInterfaceNumber)
return -ENODEV;
ar2 = kzalloc(si... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1457 | true | int mainloop(CLIENT *client) {
struct nbd_request request;
struct nbd_reply reply;
gboolean go_on=TRUE;
#ifdef DODBG
int i = 0;
#endif
negotiate(client);
DEBUG("Entering request loop!\n");
reply.magic = htonl(NBD_REPLY_MAGIC);
reply.error = 0;
while (go_on) {
char buf[BUFSIZE];
size_t len;
#ifdef DODBG
i... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1458 | true | static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
{
AC3HeaderInfo *hdr = NULL;
struct eac3_info *info;
int num_blocks, ret;
if (!track->eac3_priv && !(track->eac3_priv = av_mallocz(sizeof(*info))))
return AVERROR(ENOMEM);
info = track->eac3_priv;
if (avpriv_ac3... | |
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi... | CWE-200 | 1459 | true | static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *len, int peer)
{
struct sockaddr_l2 *la = (struct sockaddr_l2 *) addr;
struct sock *sk = sock->sk;
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
BT_DBG("sock %p, sk %p", sock, sk);
addr->sa_family = AF_BLUETOOTH;
*len = sizeof(s... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1460 | true | int lg2ff_init(struct hid_device *hid)
{
struct lg2ff_device *lg2ff;
struct hid_report *report;
struct hid_input *hidinput = list_entry(hid->inputs.next,
struct hid_input, list);
struct input_dev *dev = hidinput->input;
int error;
/* Check that the report looks ok */
report = hid_validate_values(hid, HID_... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1461 | true | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params =
reinterpret_cast<TfLiteEmbeddingLookupSparseParams*>(node->builtin_data);
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output));
const TfLiteTensor* ids;
TF_LITE_ENSURE_OK(context, GetInputS... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1462 | true | static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool compress TSRMLS_DC) /* {{{ */
{
const char *oldname = NULL;
char *oldpath = NULL;
char *basename = NULL, *basepath = NULL;
char *newname = NULL, *newpath = NULL;
zval *ret, arg1;
zend_class_entry *ce;
char *error;
const char *pcr_err... | |
{"cwe_details": {"ID": "401", "Name": "Missing Release of Memory after Effective Lifetime", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-401-Diagram.png", "Description": "The product does not sufficiently track and release allocated memory after it has been used, maki... | CWE-401 | 1463 | true | nfp_flower_spawn_phy_reprs(struct nfp_app *app, struct nfp_flower_priv *priv)
{
struct nfp_eth_table *eth_tbl = app->pf->eth_tbl;
atomic_t *replies = &priv->reify_replies;
struct nfp_flower_repr_priv *repr_priv;
struct nfp_repr *nfp_repr;
struct sk_buff *ctrl_skb;
struct nfp_reprs *reprs;
int err, reify_cnt;
un... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1464 | true | Status OpLevelCostEstimator::PredictCropAndResize(const OpContext& op_context,
NodeCosts* node_costs) const {
bool found_unknown_shapes = false;
const auto method = op_context.op_info.attr().find("method");
bool use_bilinear_interp;
if (method == op_context.op_... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1465 | true | static int snd_seq_ioctl_remove_events(struct snd_seq_client *client,
void __user *arg)
{
struct snd_seq_remove_events info;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
/*
* Input mostly not implemented XXX.
*/
if (info.remove_mode & SNDRV_SEQ_REMOVE_INPUT) {
/*
* No restr... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1466 | true | String TextCodecUTF8::Decode(const char* bytes,
wtf_size_t length,
FlushBehavior flush,
bool stop_on_error,
bool& saw_error) {
const bool do_flush = flush != FlushBehavior::kDoNotFlush;
StringBuffer<L... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1467 | true | static void singlevar (LexState *ls, expdesc *var) {
TString *varname = str_checkname(ls);
FuncState *fs = ls->fs;
singlevaraux(fs, varname, var, 1);
if (var->k == VVOID) { /* global name? */
expdesc key;
singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
lua_assert(var->k != VVOID... | |
{"cwe_details": {"ID": "415", "Name": "Double Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-415-Diagram.png", "Description": "The product calls free() twice on the same memory address.", "PotentialMitigations": [{"Phase": ["Architecture and Design"], "Descriptio... | CWE-415 | 1468 | true | static bool disconnect_cb(struct io *io, void *user_data)
{
struct bt_att_chan *chan = user_data;
struct bt_att *att = chan->att;
int err;
socklen_t len;
len = sizeof(err);
if (getsockopt(chan->fd, SOL_SOCKET, SO_ERROR, &err, &len) < 0) {
util_debug(chan->att->debug_callback, chan->att->debug_data,
"(cha... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1469 | true | static void vmxnet3_activate_device(VMXNET3State *s)
{
int i;
static const uint32_t VMXNET3_DEF_TX_THRESHOLD = 1;
hwaddr qdescr_table_pa;
uint64_t pa;
uint32_t size;
/* Verify configuration consistency */
if (!vmxnet3_verify_driver_magic(s->drv_shmem)) {
VMW_ERPRN("Device configurat... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1470 | true | status_t BnOMX::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case LIVES_LOCALLY:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
pid_t pid = (pid_t)data.readInt32();
reply->writeInt32(livesLoc... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1471 | true | static unsigned int xdr_set_page_base(struct xdr_stream *xdr,
unsigned int base, unsigned int len)
{
unsigned int pgnr;
unsigned int maxlen;
unsigned int pgoff;
unsigned int pgend;
void *kaddr;
maxlen = xdr->buf->page_len;
if (base >= maxlen) {
base = maxlen;
maxlen = 0;
} else
maxlen -= base;
... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1472 | true | wav_write_header (SF_PRIVATE *psf, int calc_length)
{ sf_count_t current ;
int error, has_data = SF_FALSE ;
current = psf_ftell (psf) ;
if (current > psf->dataoffset)
has_data = SF_TRUE ;
if (calc_length)
{ psf->filelength = psf_get_filelen (psf) ;
psf->datalength = psf->filelength - psf->dataoffset ;
... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1473 | true | static __u8 *sp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&
rdesc[106] == 0x03) {
hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n");
rdesc[105] = rdesc[110] = 0x03;
rdesc[106] = rdesc[... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1474 | true | CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
{
/* When sending a SMTP payload we must detect CRLF. sequences making sure
they are sent as CRLF.. instead, as a . on the beginning of a line will
be deleted by the server when not part of an EOB terminator and a
genuine CRLF... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1475 | true | void Compute(OpKernelContext* ctx) override {
const Tensor* inputs;
const Tensor* labels_indices;
const Tensor* labels_values;
const Tensor* seq_len;
OP_REQUIRES_OK(ctx, ctx->input("inputs", &inputs));
OP_REQUIRES_OK(ctx, ctx->input("labels_indices", &labels_indices));
OP_REQUIRES_OK(ctx, ... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1476 | true | UseCounterPageLoadMetricsObserver::GetAllowedUkmFeatures() {
static base::NoDestructor<UseCounterPageLoadMetricsObserver::UkmFeatureList>
opt_in_features(std::initializer_list<WebFeature>({
WebFeature::kNavigatorVibrate,
WebFeature::kNavigatorVibrateSubFrame,
WebFeature::kTouchEven... | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1477 | true | pdf14_pop_transparency_group(gs_gstate *pgs, pdf14_ctx *ctx,
const pdf14_nonseparable_blending_procs_t * pblend_procs,
int tos_num_color_comp, cmm_profile_t *curr_icc_profile, gx_device *dev)
{
pdf14_buf *tos = ctx->stack;
pdf14_buf *nos = tos->saved;
pdf14_mask_t *mask_stack = tos->mask_stack;
... | |
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi... | CWE-787 | 1478 | true | static void handle_rx(struct vhost_net *net)
{
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL,
.msg_namelen = 0,
.msg_control = NULL, /* FIXME: get and h... | |
{"cwe_details": {"ID": "415", "Name": "Double Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-415-Diagram.png", "Description": "The product calls free() twice on the same memory address.", "PotentialMitigations": [{"Phase": ["Architecture and Design"], "Descriptio... | CWE-415 | 1479 | true | static void rebase_buffer(struct MACH0_(obj_t) *obj, ut64 off, RIODesc *fd, ut8 *buf, int count) {
if (obj->rebasing_buffer) {
return;
}
obj->rebasing_buffer = true;
ut64 eob = off + count;
int i = 0;
for (; i < obj->nsegs; i++) {
if (!obj->chained_starts[i]) {
continue;
}
ut64 page_size = obj->chained... | |
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "ImageMagick", "commit_message": "https://github.com/ImageMagick/ImageMagick/issues/3195", "cve": "CVE-2021-20246", ... | CWE-369 | 1480 | true | MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
const double dux,const double duy,const double dvx,const double dvy)
{
double A,B,C,F;
assert(resample_filter != (ResampleFilter *) NULL);
assert(resample_filter->signature == MagickCoreSignature);
resample_filter->limit_reached = Magick... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1481 | true | vhost_user_get_inflight_fd(struct virtio_net **pdev,
VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct rte_vhost_inflight_info_packed *inflight_packed;
uint64_t pervq_inflight_size, mmap_size;
uint16_t num_queues, queue_size;
struct virtio_net *dev = *pdev;
int fd, i, j;
void *addr;
if (msg->siz... | |
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ... | CWE-190 | 1482 | true | static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define CropBox "CropBox"
#define DeviceCMYK "DeviceCMYK"
#define MediaBox "MediaBox"
#define RenderPCLText " Rendering PCL... "
char
command[MaxTextExtent],
*density,
filename[MaxTextExtent],
geometry[MaxTextExt... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1483 | true | static void php_wddx_pop_element(void *user_data, const XML_Char *name)
{
st_entry *ent1, *ent2;
wddx_stack *stack = (wddx_stack *)user_data;
HashTable *target_hash;
zend_class_entry **pce;
zval *obj;
zval *tmp;
TSRMLS_FETCH();
/* OBJECTS_FIXME */
if (stack->top == 0) {
return;
}
if (!strc... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1484 | true | static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *))
{
init_waitqueue_head(&p->wait);
p->kill = kill;
} | |
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa... | CWE-476 | 1485 | true | static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
X509 **pissuer, int *pscore, unsigned int *preasons,
STACK_OF(X509_CRL) *crls)
{
int i, crl_score, best_score = *pscore;
unsigned int reasons, best_reasons = 0;
X509 *x = ctx->current_ce... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1486 | true | xps_load_sfnt_name(xps_font_t *font, char *namep)
{
byte *namedata;
int offset, length;
/*int format;*/
int count, stringoffset;
int found;
int i, k;
found = 0;
strcpy(namep, "Unknown");
offset = xps_find_sfnt_table(font, "name", &length);
if (offset < 0 || length < 6)
{
... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1487 | true | static ssize_t stellaris_enet_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
stellaris_enet_state *s = qemu_get_nic_opaque(nc);
int n;
uint8_t *p;
uint32_t crc;
if ((s->rctl & SE_RCTL_RXEN) == 0)
return -1;
if (s->np >= 31) {
return 0;
}
DPRINTF("Receive... | |
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "tensorflow", "commit_message": "Prevent memory overflow in ParseAttrValue from nested tensors.\n\nPiperOrigin-RevId... | CWE-369 | 1488 | true | bool ParseAttrValue(StringPiece type, StringPiece text, AttrValue* out) {
// Parse type.
string field_name;
bool is_list = absl::ConsumePrefix(&type, "list(");
if (absl::ConsumePrefix(&type, "string")) {
field_name = "s";
} else if (absl::ConsumePrefix(&type, "int")) {
field_name = "i";
} else if (a... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1489 | true | static int xemaclite_of_probe(struct platform_device *ofdev)
{
struct resource *res;
struct net_device *ndev = NULL;
struct net_local *lp = NULL;
struct device *dev = &ofdev->dev;
int rc = 0;
dev_info(dev, "Device Tree Probing\n");
/* Create an ethernet device instance */
ndev = alloc_etherdev(sizeof(struct ... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1490 | true | static Image *ReadWEBPImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
int
webp_status;
MagickBooleanType
status;
register unsigned char
*p;
size_t
length;
ssize_t
count,
y;
unsigned char
header[12],
*stream;
WebPDecoderConfig
... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1491 | true | static gint conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf)
{
const guchar *in = inbuf;
guchar *out = outbuf;
JISState state = JIS_ASCII;
while (*in != '\0') {
if (IS_ASCII(*in)) {
K_OUT();
*out++ = *in++;
} else if (iseuckanji(*in)) {
if (iseuckanji(*(in + 1))) {
K_IN();
*out++ ... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1492 | true | void Compute(OpKernelContext* ctx) override {
const Tensor& a = ctx->input(0);
const Tensor& b = ctx->input(1);
OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(a.shape()),
errors::InvalidArgument("a is not a matrix"));
OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(b.shape()),
... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1493 | true | static int ocsp_verify_signer(X509 *signer, int response,
X509_STORE *st, unsigned long flags,
STACK_OF(X509) *untrusted, STACK_OF(X509) **chain)
{
X509_STORE_CTX *ctx = X509_STORE_CTX_new();
X509_VERIFY_PARAM *vp;
int ret = -1;
if (ctx == NUL... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1494 | true | static int g2m_init_buffers(G2MContext *c)
{
int aligned_height;
if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) {
c->framebuf_stride = FFALIGN(c->width * 3, 16);
aligned_height = FFALIGN(c->height, 16);
av_free(c->framebuf);
c->framebuf = a... | |
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ... | CWE-119 | 1495 | true | SplashPath *Splash::makeDashedPath(SplashPath *path) {
SplashPath *dPath;
SplashCoord lineDashTotal;
SplashCoord lineDashStartPhase, lineDashDist, segLen;
SplashCoord x0, y0, x1, y1, xa, ya;
GBool lineDashStartOn, lineDashOn, newPath;
int lineDashStartIdx, lineDashIdx;
int i, j, k;
lineDashTotal = 0;
... | |
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ... | CWE-20 | 1496 | true | static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
{
VALUE source, opts;
GET_PARSER_INIT;
if (json->Vsource) {
rb_raise(rb_eTypeError, "already initialized instance");
}
#ifdef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
rb_scan_args(argc, argv, "1:", &source, &opts);
#else
rb_scan_... | |
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save... | CWE-416 | 1497 | true | static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
{
register struct mbuf *m = dtom(slirp, ip);
register struct ipasfrag *q;
int hlen = ip->ip_hl << 2;
int i, next;
DEBUG_CALL("ip_reass");
DEBUG_ARG("ip = %p", ip);
DEBUG_ARG("fp = %p", fp);
DEBUG_ARG("m = %p", m);
... | |
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme... | CWE-125 | 1498 | true | CallResult<PseudoHandle<>> JSObject::getComputedWithReceiver_RJS(
Handle<JSObject> selfHandle,
Runtime *runtime,
Handle<> nameValHandle,
Handle<> receiver) {
// Try the fast-path first: no "index-like" properties and the "name" already
// is a valid integer index.
if (selfHandle->flags_.fastIndexP... | |
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur... | CWE-703 | 1499 | true | setup_server_realm(krb5_principal sprinc)
{
krb5_error_code kret;
kdc_realm_t *newrealm;
kret = 0;
if (kdc_numrealms > 1) {
if (!(newrealm = find_realm_data(sprinc->realm.data,
(krb5_ui_4) sprinc->realm.length)))
kret = ENOE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.