code
stringlengths
10
33.4M
task
stringclasses
2 values
label
stringclasses
121 values
language
stringclasses
13 values
struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, const char *hostname, const struct sockaddr_in *addr, const char *mntpath, const char *ip_addr, rpc_authflavor_t authflavour, struct nfs_fh *mntfh) { struct nfs_fattr fattr; struct nfs...
cwe
CWE-20
Unknown
/* * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All rights reserved. See COPYRIGHT. * * 7 Oct 1997 added checks for 0 data. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ /* this streams writes */ #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include...
cwe
CWE-122
C/C++
exec_instructions(ectx_T *ectx) { int ret = FAIL; int save_trylevel_at_start = ectx->ec_trylevel_at_start; int dict_stack_len_at_start = dict_stack.ga_len; // Start execution at the first instruction. ectx->ec_iidx = 0; // Only catch exceptions in this instruction list. ectx->ec_tryleve...
cwe
CWE-416
Unknown
function showTooltip(pos, item, formater) { var content = formater(item); $('<div id="flot-tooltip">' + content + '</div>').css({ top: pos.pageY - 40, left: pos.pageX -10, 'border-color': item.series.color }).appendTo("body").zIndex(5000).show(); }
cwe
CWE-79
JavaScript
static void check_pointer_type_change(Notifier *notifier, void *data) { VncState *vs = container_of(notifier, VncState, mouse_mode_notifier); int absolute = qemu_input_is_absolute(); if (vnc_has_feature(vs, VNC_FEATURE_POINTER_TYPE_CHANGE) && vs->absolute != absolute) { vnc_lock_output(vs); ...
cwe
CWE-125
Unknown
/* * Dragonfly - Runtime dependency management library * Copyright (c) 2021 Joshua Sing <joshua@hypera.dev> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, in...
cwe
CWE-611
Java
function linkcatSpanFadeOut( linkid, ame_linkcats ) { //jQuery("span#ame_linkcategory" + linkid + ", a#thickboxlink" + linkid).fadeOut('fast', function() { var loading = '<img border="0" alt="" src="' + ameAjaxL10n.imgUrl + 'loader.gif" align="absbottom" /> ' + ameAjaxL10n.pleaseWait; jQuery("span#ame_linkcategory...
cwe
CWE-352
JavaScript
/** * Add a data array to the table, creating DOM node etc. This is the parallel to * _fnGatherData, but for adding rows from a Javascript source, rather than a * DOM source. * @param {object} oSettings dataTables settings object * @param {array} aData data array to be added * @param {node} [nTr] TR element to...
cwe
CWE-1321
JavaScript
/* * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd. * * Author: zccrs <zccrs@live.com> * * Maintainer: zccrs <zhangjide@deepin.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
cwe
CWE-59
C/C++
void PsdImage::readMetadata() { #ifdef DEBUG std::cerr << "Exiv2::PsdImage::readMetadata: Reading Photoshop file " << io_->path() << "\n"; #endif if (io_->open() != 0) { throw Error(kerDataSourceOpenFailed, io_->path(), strError()); } IoCloser closer(*io_); ...
cwe
CWE-125
C/C++
static bool io_rw_reissue(struct io_kiocb *req, long res) { #ifdef CONFIG_BLOCK int ret; if ((res != -EAGAIN && res != -EOPNOTSUPP) || io_wq_current_is_worker()) return false; init_task_work(&req->task_work, io_rw_resubmit); ret = io_req_task_work_add(req, &req->task_work); if (!ret) return true; #endif ret...
cwe
CWE-416
Unknown
private State readHeaders(ByteBuf buffer) { final HttpMessage message = this.message; final HttpHeaders headers = message.headers(); AppendableCharSequence line = headerParser.parse(buffer); if (line == null) { return null; } if (line.length() > 0) { ...
cwe
CWE-444
Java
static int rxrpc_krb5_decode_principal(struct krb5_principal *princ, const __be32 **_xdr, unsigned int *_toklen) { const __be32 *xdr = *_xdr; unsigned int toklen = *_toklen, n_parts, loop, tmp; /* there must be at least one name, and at least #names+1 length * words */ if (toklen <= 12) r...
cwe
CWE-190
Unknown
/* * The copyright in this software is being made available under the 2-clauses * BSD License, included below. This software may be subject to other third * party and contributor rights, including patent rights, and no such rights * are granted under this license. * * Copyright (c) 2002-2014, Universite catholiqu...
cwe
CWE-119
C/C++
/* * VC-1 and WMV3 decoder * Copyright (c) 2011 Mashiat Sarker Shakkhar * Copyright (c) 2006-2007 Konstantin Shishkov * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under ...
cwe
CWE-125
C/C++
def _lookup(self, name, *args, **kwargs): instance = self._lookup_loader.get(name.lower(), loader=self._loader, templar=self) if instance is not None: wantlist = kwargs.pop('wantlist', False) from ansible.utils.listify import listify_lookup_plugin_terms loop_terms =...
cwe
CWE-20
Python
public function display_sdm_upload_meta_box($post) { // File Upload metabox $old_upload = get_post_meta($post->ID, 'sdm_upload', true); $old_value = isset($old_upload) ? $old_upload : ''; _e('Manually enter a valid URL of the file in the text box below, or click "Select File" button to upload (or choose) the downl...
cwe
CWE-79
PHP
const got = require('@/utils/got'); const cheerio = require('cheerio'); const { parseDate } = require('@/utils/parse-date'); const { art } = require('@/utils/render'); const path = require('path'); module.exports = async (ctx) => { const { domain = '91porn.com' } = ctx.query; const { uid, lang = 'en_US' } = ct...
cwe
CWE-918
JavaScript
# -*- coding: utf-8 -*- """Define tables and columns.""" from collective.task import _ from collective.task import PMF from collective.task.adapters import EMPTY_STRING from plone import api from Products.CMFPlone.utils import normalizeString from Products.CMFPlone.utils import safe_unicode from z3c.table.column impor...
cwe
CWE-79
Python
static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) { BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *r3 = NULL, *tmp; int bitsp, bitsq, ok = -1, n = 0; BN_CTX *ctx = NULL; unsigned long error = 0; /* * When generating ridiculously small k...
cwe
CWE-310
Unknown
!function(r){Craft.FeedWidget=Garnish.Base.extend({$widget:null,init:function(t,i,e){this.$widget=r("#widget"+t),this.$widget.addClass("loading");var a={url:i,limit:e};Craft.postActionRequest("dashboard/get-feed-items",a,r.proxy(function(t,i){if(this.$widget.removeClass("loading"),"success"===i){this.$widget.find("tabl...
cwe
CWE-79
JavaScript
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2000-2021 * All rights reserved * * This file is part of GPAC / NALU (AVC, HEVC, VVC) reframer filter * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the ...
cwe
CWE-476
C/C++
function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function S(){mxShape.call(this)}function P(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Aa(){mxCy...
cwe
CWE-20
JavaScript
void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSelection, const VisiblePosition& endOfSelection) { Position start = startOfSelection.deepEquivalent().downstream(); if (isAtUnsplittableElement(start)) { RefPtr<Element> blockquote = createBlockElement(); insertNodeAt(...
cwe
CWE-399
C/C++
PHP_FUNCTION(stream_get_meta_data) { zval *arg1; php_stream *stream; zval *newval; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { return; } php_stream_from_zval(stream, &arg1); array_init(return_value); if (stream->wrapperdata) { MAKE_STD_ZVAL(newval); MAKE_COPY_ZVAL(&st...
cwe
CWE-20
Unknown
xmlParseElement(xmlParserCtxtPtr ctxt) { const xmlChar *name; const xmlChar *prefix = NULL; const xmlChar *URI = NULL; xmlParserNodeInfo node_info; int line, tlen = 0; xmlNodePtr ret; int nsNr = ctxt->nsNr; if (((unsigned int) ctxt->nameNr > xmlParserMaxDepth) && ((ctxt->options...
cwe
CWE-119
Unknown
#ifdef HAVE_CONFIG_H #include "config.h" #elif defined(_MSC_VER) #include "config-msvc.h" #endif #include "syshead.h" #include "base64.h" #include "buffer.h" #include "crypto.h" #include "openvpn.h" #include "ssl_common.h" #include "auth_token.h" #include "push.h" #include "integer.h" #include "ssl.h" #include "ssl_v...
cwe
CWE-287
C/C++
static void copy_to_user_policy(struct xfrm_policy *xp, struct xfrm_userpolicy_info *p, int dir) { memcpy(&p->sel, &xp->selector, sizeof(p->sel)); memcpy(&p->lft, &xp->lft, sizeof(p->lft)); memcpy(&p->curlft, &xp->curlft, sizeof(p->curlft)); p->priority = xp->priority; p->index = xp->index; p->sel.family = xp...
cwe
CWE-200
C/C++
package com.salesmanager.shop.admin.model.orders; import java.io.Serializable; public class Refund implements Serializable { /** * */ private static final long serialVersionUID = 2392736671094915447L; private Long orderId; private String amount; public Long getOrderId() { return orderId; } public void...
cwe
CWE-639
Java
ber_parse_header(STREAM s, int tagval, int *length) { int tag, len; if (tagval > 0xff) { in_uint16_be(s, tag); } else { in_uint8(s, tag); } if (tag != tagval) { logger(Core, Error, "ber_parse_header(), expected tag %d, got %d", tagval, tag); return False; } in_uint8(s, len); if (len & 0x80) { ...
cwe
CWE-125
C/C++
ssize_t tpm_write(struct file *file, const char __user *buf, size_t size, loff_t *off) { struct tpm_chip *chip = file->private_data; size_t in_size = size, out_size; /* cannot perform a write until the read has cleared either via tpm_read or a user_read_timer timeout */ while (atomic_read(&chip->data_pendi...
cwe
CWE-200
Unknown
EBMLHeader::~EBMLHeader() { delete[] m_docType; }
cwe
CWE-119
C/C++
func (r *TokenRevocationHandler) RevokeToken(ctx context.Context, token string, tokenType fosite.TokenType, client fosite.Client) error { discoveryFuncs := []func() (request fosite.Requester, err error){ func() (request fosite.Requester, err error) { // Refresh token signature := r.RefreshTokenStrategy.Refresh...
cwe
CWE-754
Go
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { const char *option; float *chromaticity, x_position, y_position, x_resolution, y_resolution; Image *image; int tiff_status; MagickBooleanType status; MagickSizeType number_pixe...
cwe
CWE-770
C/C++
static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, u32 pid, u32 seq, u16 flags, int event) { struct tcmsg *tcm; struct nlmsghdr *nlh; unsigned char *b = skb_tail_pointer(skb); nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); tcm = NLMSG_DATA(nlh); tcm->tcm_famil...
cwe
CWE-200
Unknown
void hid_reset(HIDState *hs) { switch (hs->kind) { case HID_KEYBOARD: memset(hs->kbd.keycodes, 0, sizeof(hs->kbd.keycodes)); memset(hs->kbd.key, 0, sizeof(hs->kbd.key)); hs->kbd.keys = 0; break; case HID_MOUSE: case HID_TABLET: memset(hs->ptr.queue, 0, sizeof(hs->...
cwe
CWE-772
C/C++
// Generated by CoffeeScript 2.5.1 var _snake_case, clone, compare, is_object, is_object_literal, merge, mutate, snake_case; merge = function() { return mutate({}, ...arguments); }; clone = function(target) { if (Array.isArray(target)) { return target.map(function(element) { return clone(element); }...
cwe
CWE-1321
JavaScript
int main(int argc, char *argv[]) { GooString *fileName; UnicodeMap *uMap; GooString *ownerPW, *userPW; PDFDoc *doc; char uBuf[8]; char path[1024]; char *p; bool ok; int exitCode; GooList *embeddedFiles = nullptr; int nFiles, nPages, n, i, j; FileSpec *fileSpec; Page *page; Annots *annots; ...
cwe
CWE-476
C/C++
/** @odoo-module **/ import { registry } from "@web/core/registry"; import { Many2OneAvatarUserField, KanbanMany2OneAvatarUserField, many2OneAvatarUserField, kanbanMany2OneAvatarUserField, } from "@mail/web/fields/many2one_avatar_user_field/many2one_avatar_user_field"; export class Many2OneAvatarEmplo...
cwe
CWE-284
JavaScript
CompositeDeepScanLine::setFrameBuffer(const FrameBuffer& fr) { // // count channels; build map between channels in frame buffer // and channels in internal buffers // _Data->_channels.resize(3); _Data->_channels[0]="Z"; _Data->_channels[1]=_Data->_zback ? "ZBack" : "Z"; _Data->...
cwe
CWE-787
C/C++
GF_Err diST_box_read(GF_Box *s, GF_BitStream *bs) { u32 i; char str[1024]; GF_DIMSScriptTypesBox *p = (GF_DIMSScriptTypesBox *)s; i=0; str[0]=0; while (1) { str[i] = gf_bs_read_u8(bs); if (!str[i]) break; i++; } ISOM_DECREASE_SIZE(p, i); p->content_script_types = gf_strdup(str); return GF_OK; }
cwe
CWE-125
C/C++
function fillDiagramsList(diagrams, isTemplate, asList, searchImportCats, internalCall) { function setSubmitBtnLbl() { toggleButtons(isTemplate); }; if (!internalCall) { diagramsTiles.innerHTML = ''; swapActiveItem(); curDiagList = diagrams; curSearchImportCats = searchImportCats; } ...
cwe
CWE-94
JavaScript
static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image, const size_t data_size,ExceptionInfo *exception) { #define MaxCode(number_bits) ((one << (number_bits))-1) #define MaxHashTable 5003 #define MaxGIFBits 12UL #define MaxGIFTable (1UL << MaxGIFBits) #define GIFOutputCode(code) \ { \ /*...
cwe
CWE-787
Unknown
0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var x=v.lastIndexOf(".");0...
cwe
CWE-20
JavaScript
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cwe
CWE-824
Python
ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location) { ssh_scp scp = NULL; if (session == NULL) { goto error; } scp = (ssh_scp)calloc(1, sizeof(struct ssh_scp_struct)); if (scp == NULL) { ssh_set_error(session, SSH_FATAL, "Error allocating ...
cwe
CWE-78
Unknown
gss_process_context_token (minor_status, context_handle, token_buffer) OM_uint32 * minor_status; gss_ctx_id_t context_handle; gss_buffer_t token_buffer; { OM_uint32 status; gss_union_ctx_id_t ctx; gss_mechanism mech; if (minor_status == NULL) ...
cwe
CWE-415
C/C++
prepare_repo_download_targets(LrHandle *handle, LrYumRepo *repo, LrYumRepoMd *repomd, LrMetadataTarget *mdtarget, GSList **targets, GSList **cbdata_list, ...
cwe
CWE-22
C/C++
removeAllCookies(cb) { this.idx = {}; return cb(null); }
cwe
CWE-1321
JavaScript
evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch) { struct evbuffer_chain **chainp; int n; int result; #ifdef USE_IOVEC_IMPL int nvecs, i, remaining; #else struct evbuffer_chain *chain; unsigned char *p; #endif EVBUFFER_LOCK(buf); if (buf->freeze_end) { result = -1; goto done; } n =...
cwe
CWE-189
Unknown
static function show($itemtype, $options = []) { global $CFG_GLPI; if ($itemtype && !($item = getItemForItemtype($itemtype))) { return false; } $table = $item->getTable(); $params['name'] = $item->getForeignKeyField(); $params['value'] = (($...
cwe
CWE-639
PHP
void Compute(OpKernelContext* ctx) override { const Tensor& shape_tensor = ctx->input(0); const Tensor& means_tensor = ctx->input(1); const Tensor& stddevs_tensor = ctx->input(2); const Tensor& minvals_tensor = ctx->input(3); const Tensor& maxvals_tensor = ctx->input(4); OP_REQUIRES( ct...
cwe
CWE-125
Unknown
package io.metersphere.xpack.track.issue; import io.metersphere.base.domain.IssuesWithBLOBs; import io.metersphere.base.domain.Project; import io.metersphere.dto.UserDTO; import io.metersphere.xpack.track.dto.*; import io.metersphere.xpack.track.dto.request.IssuesRequest; import io.metersphere.xpack.track.dto.request....
cwe
CWE-79
Java
static char *print_object( cJSON *item, int depth, int fmt ) { char **entries = 0, **names = 0; char *out = 0, *ptr, *ret, *str; int len = 7, i = 0, j; cJSON *child = item->child; int numentries = 0, fail = 0; /* Count the number of entries. */ while ( child ) { ++numentries; child = child->next; } /* Al...
cwe
CWE-120
C/C++
file_add_mapi_attrs (File* file, MAPI_Attr** attrs) { int i; for (i = 0; attrs[i]; i++) { MAPI_Attr* a = attrs[i]; if (a->num_values) { switch (a->name) { case MAPI_ATTACH_LONG_FILENAME: if (file->name) XFREE(file->name); file->name = strdup( (char*)a->values[0].data.buf ); b...
cwe
CWE-125
C/C++
$arcs['create']['application/x-rar'] = array('cmd' => ELFINDER_RAR_PATH, 'argc' => 'a -inul' . (defined('ELFINDER_RAR_MA4') && ELFINDER_RAR_MA4? ' -ma4' : ''), 'ext' => 'rar');
cwe
CWE-78
PHP
from django.contrib import admin import import_export.widgets as widgets from import_export.admin import ImportExportModelAdmin from import_export.fields import Field from import_export.resources import ModelResource from .models import (PurchaseOrder, PurchaseOrderExtraLine, PurchaseOrderLineIte...
cwe
CWE-79
Python
def nofollowify_links(string) if this_blog.dofollowify string else string.gsub(/<a(.*?)>/i, '<a\1 rel="nofollow">') end end
cwe
CWE-79
Ruby
scope.findPirate = function (pirate) { return Array.prototype.slice.call(arguments); };
cwe
CWE-74
JavaScript
void CoordinatorImpl::PerformNextQueuedGlobalMemoryDump() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); QueuedRequest* request = GetCurrentRequest(); if (request == nullptr) return; std::vector<QueuedRequestDispatcher::ClientInfo> clients; for (const auto& kv : clients_) { auto client_identity =...
cwe
CWE-416
C/C++
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cwe
CWE-20
Python
/* Copyright The Helm Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib...
cwe
CWE-74
Go
initialise_banding(fz_context *ctx, render_details *render, int color) { size_t min_band_mem; int bpp, h, w, reps; render->colorspace = output_cs; render->format = output_format; #if GREY_FALLBACK != 0 if (color == 0) { if (render->colorspace == CS_RGB) { /* Fallback from PPM to PGM */ render->colorspa...
cwe
CWE-369
C/C++
apprentice_load(struct magic_set *ms, const char *fn, int action) { int errs = 0; uint32_t i, j; size_t files = 0, maxfiles = 0; char **filearr = NULL; struct stat st; struct magic_map *map; struct magic_entry_set mset[MAGIC_SETS]; php_stream *dir; php_stream_dirent d; TSRMLS_FETCH(); memset(mset, 0, size...
cwe
CWE-17
C/C++
def parse(parent, line, pos, content, strict=true) if content !~ /^<\S/ Text.new(parent, line, pos, content) else scanner = StringScanner.new(content) unless scanner.skip(/</) if strict raise "expected <" else return Text...
cwe
CWE-79
Ruby
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/ory/fosite/handler/oauth2 (interfaces: AccessTokenStorage) // Package internal is a generated GoMock package. package internal import ( context "context" reflect "reflect" gomock "github.com/golang/mock/gomock" fosite "github.com/ory/fosite" ) //...
cwe
CWE-287
Go
get_matching_data(krb5_context context, pkinit_plg_crypto_context plg_cryptoctx, pkinit_req_crypto_context req_cryptoctx, X509 *cert, pkinit_cert_matching_data **md_out) { krb5_error_code ret = ENOMEM; pkinit_cert_matching_data *md = NULL; krb5_principal...
cwe
CWE-119
C/C++
TfLiteRegistration CancelOpRegistration() { TfLiteRegistration reg = {nullptr, nullptr, nullptr, nullptr}; // Set output size to the input size in CancelOp::Prepare(). Code exists to // have a framework in Prepare. The input and output tensors are not used. reg.prepare = [](TfLiteContext* context, TfLi...
cwe
CWE-125
C/C++
/** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the * <a href="http://www.apache...
cwe
CWE-91
Java
static sctp_disposition_t sctp_sf_violation_paramlen( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { static const char err_str[] = "The following parameter had invalid length:"; return...
cwe
CWE-20
Unknown
function XMLRPCgetUserGroups($groupType=0, $affiliationid=0) { global $user; $groups = getUserGroups($groupType, $affiliationid); // Filter out any groups to which the user does not have access. $usergroups = array(); foreach($groups as $id => $group){ if($group['ownerid'] == $user['id'] ||...
cwe
CWE-264
PHP
public DefaultFileSystemResourceLoader() { this.baseDirPath = Optional.empty(); }
cwe
CWE-22
Java
void ExtensionsGuestViewMessageFilter::FrameNavigationHelper::FrameDeleted( RenderFrameHost* render_frame_host) { if (render_frame_host->GetFrameTreeNodeId() != frame_tree_node_id_) return; filter_->ResumeAttachOrDestroy(element_instance_id_, MSG_ROUTING_NONE /* no plugin fr...
cwe
CWE-362
C/C++
public GCM() { super(new GCMBlockCipher(new AESFastEngine())); }
cwe
CWE-310
Java
/* * Block multiqueue core code * * Copyright (C) 2013-2014 Jens Axboe * Copyright (C) 2013-2014 Christoph Hellwig */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/backing-dev.h> #include <linux/bio.h> #include <linux/blkdev.h> #include <linux/mm.h> #include <linux/init.h> #include <linux/sla...
cwe
CWE-264
C/C++
def whitelist(users: str): for user in users.split(): call(WHITELIST_COMMAND_TEMPLATE.format(user))
cwe
CWE-78
Python
void RenderFrameImpl::OnSelectPopupMenuItems( bool canceled, const std::vector<int>& selected_indices) { if (!external_popup_menu_) return; blink::WebScopedUserGesture gesture(frame_); external_popup_menu_->DidSelectItems(canceled, selected_indices); external_popup_menu_.reset(); }
cwe
CWE-416
C/C++
# -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/...
cwe
CWE-306
Python
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) return -EINVAL; args = CMSG_DATA(cmsg); /* Nonmasked & m...
cwe
CWE-476
C/C++
static void ip6_append_data_mtu(int *mtu, int *maxfraglen, unsigned int fragheaderlen, struct sk_buff *skb, struct rt6_info *rt) { if (!(rt->dst.flags & DST_XFRM_TUNNEL)) { if (skb == NULL) { /* first fragment, reserve header_len */ *mtu = *mtu - rt->dst.header_len; } else { /* ...
cwe
CWE-399
C/C++
fingerprint_from_pk (PKT_public_key *pk, byte *array, size_t *ret_len) { const byte *dp; size_t len; gcry_md_hd_t md; md = do_fingerprint_md(pk); dp = gcry_md_read( md, 0 ); len = gcry_md_get_algo_dlen (gcry_md_get_algo (md)); assert( len <= MAX_FINGERPRINT_LEN ); if (!array) array = xmalloc ( len ...
cwe
CWE-20
Unknown
rb_push_glob(VALUE str, VALUE base, int flags) /* '\0' is delimiter */ { long offset = 0; VALUE ary; GlobPathValue(str, TRUE); ary = rb_ary_new(); while (offset < RSTRING_LEN(str)) { char *p, *pend; int status; p = RSTRING_PTR(str) + offset; status = push_glob(ary, rb_enc_str_new(p, strlen(p),...
cwe
CWE-22
Unknown
/* . .o8 oooo .o8 "888 `888 .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P' 888 888 888 888 888 888 888o...
cwe
CWE-434
JavaScript
GF_Err Media_CheckDataEntry(GF_MediaBox *mdia, u32 dataEntryIndex) { GF_DataEntryURLBox *entry; GF_DataMap *map; GF_Err e; if (!mdia || !dataEntryIndex || dataEntryIndex > gf_list_count(mdia->information->dataInformation->dref->child_boxes)) return GF_BAD_PARAM; entry = (GF_DataEntryURLBox*)gf_list_get(mdia->inf...
cwe
CWE-787
C/C++
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cwe
CWE-20
Python
/* * Copyright © 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
cwe
CWE-601
Go
_gnutls_recv_handshake_header (gnutls_session_t session, gnutls_handshake_description_t type, gnutls_handshake_description_t * recv_type) { int ret; uint32_t length32 = 0; uint8_t *dataptr = NULL; /* for realloc */ size_t handshake_header_size = HANDSHAKE_HEADER_SIZE; /* if we have data i...
cwe
CWE-189
C/C++
int bson_check_field_name( bson *b, const char *string, const int length ) { return bson_validate_string( b, ( const unsigned char * )string, length, 1, 1, 1 ); }
cwe
CWE-190
Unknown
store_rrsets(struct module_env* env, struct reply_info* rep, time_t now, time_t leeway, int pside, struct reply_info* qrep, struct regional* region) { size_t i; /* see if rrset already exists in cache, if not insert it. */ for(i=0; i<rep->rrset_count; i++) { rep->ref[i].key = rep->rrsets[i]; rep->ref[i].id = r...
cwe
CWE-703
Unknown
# -*- coding: utf-8 -*- # rdiffweb, A web interface to rdiff-backup repositories # Copyright (C) 2012-2021 rdiffweb contributors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
cwe
CWE-601
Python
ResolveStateAndPredicate(ExprDef *expr, enum xkb_match_operation *pred_rtrn, xkb_mod_mask_t *mods_rtrn, CompatInfo *info) { if (expr == NULL) { *pred_rtrn = MATCH_ANY_OR_NONE; *mods_rtrn = MOD_REAL_MASK_ALL; return true; } *pred_rtrn = MATCH_EXACTLY; i...
cwe
CWE-476
C/C++
static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_getaclargs *args) { struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args), }; uint32_t replen; encode_compound_hdr(xdr, req, &hdr); encode_sequence(xdr, &args->seq_args, &hdr); encode_putfh...
cwe
CWE-189
Unknown
index_constraint_create(Relation heapRelation, Oid indexRelationId, IndexInfo *indexInfo, const char *constraintName, char constraintType, bool deferrable, bool initdeferred, bool mark_as_primary, bool update_pgindex, bool remove_old_dependencies, bool allow_s...
cwe
CWE-362
Unknown
func (k Keeper) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, ack exported.Acknowledgement, ) exported.Acknowledgement { params := k.GetParams(ctx) // short circuit in case claim is not active (no-op) if !params.IsClaimsActive(ctx.BlockTime()) { return ack } // unmarshal packet data to obtain t...
cwe
CWE-287
Go
bool cephx_verify_authorizer(CephContext *cct, KeyStore *keys, bufferlist::iterator& indata, CephXServiceTicketInfo& ticket_info, bufferlist& reply_bl) { __u8 authorizer_v; uint32_t service_id; uint64_t global_id; CryptoKey service_secret; // ticket blob CephXTicketBlob ticket; try { ...
cwe
CWE-287
Unknown
void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count, int preview_request_id) { VLOG(1) << "Print preview request finished with " << expected_pages_count << " pages"; if (!initial_preview_start_time_.is_null()) { UMA_HISTOGRAM_TIMES("Pri...
cwe
CWE-200
C/C++
ia){ja=fa.getAttribute("section");ba=fa.getAttribute("subsection");if(null==ja&&(ma=ia.indexOf("/"),ja=ia.substring(0,ma),null==ba)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ba=ia.substring(ma+1,qa))}ma=ta[ja];null==ma&&(ya++,ma=[],ta[ja]=ma);ia=fa.getAttribute("clibs");null!=ca[ia]&&(ia=ca[ia]);ia={url:fa.getAttribute("url...
cwe
CWE-20
JavaScript
void cpu_print_filter(pid_t pid) { EUID_ASSERT(); // in case the pid is that of a firejail process, use the pid of the first child process pid = switch_to_child(pid); // now check if the pid belongs to a firejail sandbox if (is_ready_for_join(pid) == false) { fprintf(stderr, "Error: no valid sandbox\n"); exi...
cwe
CWE-94
Unknown
package tapProvider
cwe
CWE-287
Go
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cwe
CWE-787
C/C++