code
stringlengths
10
33.4M
task
stringclasses
2 values
label
stringclasses
121 values
language
stringclasses
13 values
/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 2006-2016 The PHP Group | +--------------...
cwe
CWE-119
C/C++
static ssize_t pm_qos_no_power_off_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%d\n", !!(dev_pm_qos_requested_flags(dev) & PM_QOS_FLAG_NO_POWER_OFF)); }
cwe
CWE-787
Unknown
BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) { struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; int i, j, jidx; /* volatile so we can gdFree it on return from longjmp */ volatile JSAMPROW row = 0; JSAMPROW rowptr[1]; jmpbuf_wrapper jmpbufw; JDIMENSION nlines; cha...
cwe
CWE-415
Unknown
var equipmentTable = $('#equipment-table').DataTable({ 'order': [[0, 'asc']], 'select': 'single', 'initComplete': function() { this.api().row({ order: 'current' }, 0).select(); DisplayEquipment($('#equipment-table tbody tr:eq(0)').data("equipment-id")); } }); $('#equipment-table tbody').removeClass("d-none");...
cwe
CWE-79
JavaScript
public function save($check_notify = false) { if (isset($_POST['email_recipients']) && is_array($_POST['email_recipients'])) { $this->email_recipients = base64_encode(serialize($_POST['email_recipients'])); } return parent::save($check_notify); }
cwe
CWE-89
PHP
function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(D.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";Y.appendChild(D);F.insertBefore(Y,O);V.style.display="none";O.style...
cwe
CWE-94
JavaScript
static FITS_HDU_LIST *fits_decode_header (FITS_RECORD_LIST *hdr, long hdr_offset, long dat_offset) {FITS_HDU_LIST *hdulist; FITS_DATA *fdat; char errmsg[80], key[9]; int k, bpp, random_groups; long mul_axis, data_size, bitpix_supported; #define FITS_DECODE_CARD(mhdr,mkey,mfdat,mtyp) \ {st...
cwe
CWE-476
C/C++
MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const vector<InputPartData*>& parts) { // // Reconstruct broken chunk offset tables. Stop once we received any exception. // Int64 position = is.tellg(); // // check we understand all the part...
cwe
CWE-94
C/C++
AvahiDnsPacket *avahi_recv_dns_packet_ipv4( int fd, AvahiIPv4Address *ret_src_address, uint16_t *ret_src_port, AvahiIPv4Address *ret_dst_address, AvahiIfIndex *ret_iface, uint8_t *ret_ttl) { AvahiDnsPacket *p= NULL; struct msghdr msg; struct iovec io; siz...
cwe
CWE-399
Unknown
/** * OLAT - Online Learning and Training<br> * http://www.olat.org * <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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unl...
cwe
CWE-23
Java
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
CWE-401
C/C++
int create_user_ns(struct cred *new) { struct user_namespace *ns, *parent_ns = new->user_ns; kuid_t owner = new->euid; kgid_t group = new->egid; int ret; /* The creator needs a mapping in the parent user namespace * or else we won't be able to reasonably tell userspace who * created a user_namespace. ...
cwe
CWE-264
C/C++
TfLiteStatus Rfft2dHelper(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, kInputTensor); const float* input_data = GetTensorData<float>(input); const TfLiteTensor* fft_length = GetInput(context, node, kFftLengthTensor); const int32_t* fft_length_data = GetTensorDa...
cwe
CWE-125
C/C++
/************************************************************************ * This file is part of EspoCRM. * * EspoCRM - Open Source CRM application. * Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko * Website: https://www.espocrm.com * * EspoCRM is free software: you can redistribute i...
cwe
CWE-79
JavaScript
package server import ( "context" "errors" "fmt" "sort" "sync" "time" "github.com/ipfs/go-cid" blockstore "github.com/ipfs/go-ipfs-blockstore" "github.com/ipfs/go-libipfs/bitswap/internal/defaults" "github.com/ipfs/go-libipfs/bitswap/message" pb "github.com/ipfs/go-libipfs/bitswap/message/pb" bmetrics "gi...
cwe
CWE-770
Go
/* * XDR support for nfsd/protocol version 3. * * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> * * 2003-08-09 Jamie Lokier: Use htonl() for nanoseconds, not htons()! */ #include <linux/namei.h> #include <linux/sunrpc/svc_xprt.h> #include "xdr3.h" #include "auth.h" #include "netns.h" #include "vf...
cwe
CWE-404
C/C++
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cwe
CWE-190
C/C++
function p(H,F,J,R,W){function O(Q,P,T){var X=document.createElement("li");X.className="geCommentAction";var ba=document.createElement("a");ba.className= "geCommentActionLnk";mxUtils.write(ba,Q);X.appendChild(ba);mxEvent.addListener(ba,"click",function(ja){P(ja,H);ja.preventDefault();mxEvent.consume(ja)});S.appendChild...
cwe
CWE-94
JavaScript
png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length) { png_alloc_size_t limit = PNG_UINT_31_MAX; # ifdef PNG_SET_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_malloc_max > 0 && png_ptr->user_chunk_malloc_max < limit) limit = png_ptr->user_chunk_malloc_max; # elif PNG_USER_CHU...
cwe
CWE-190
C/C++
# Zulip's main markdown implementation. See docs/subsystems/markdown.md for # detailed documentation on our markdown syntax. from typing import (Any, Callable, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, TypeVar, Union, cast) from mypy_extensions import TypedDict from typing.re import M...
cwe
CWE-601
Python
static void cirrus_bitblt_cputovideo_next(CirrusVGAState * s) { int copy_count; uint8_t *end_ptr; if (s->cirrus_srccounter > 0) { if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) { cirrus_bitblt_common_patterncopy(s, s->cirrus_bltbuf); the_end: s->cirrus_srccount...
cwe
CWE-787
Unknown
static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct net *tgt_net = net; struct ifinfomsg *ifm; char ifname[IFNAMSIZ]; struct nlattr *tb[IFLA_MAX+1]; struct net_device *dev = NULL; struct sk_buff *nskb; int netnsid = ...
cwe
CWE-476
Unknown
int ber_write_length(wStream* s, int length) { if (length > 0x7F) { Stream_Write_UINT8(s, 0x82); Stream_Write_UINT16_BE(s, length); return 3; } else { Stream_Write_UINT8(s, length); return 1; } }
cwe
CWE-476
Unknown
function update_interface_row(row, interface_form) { var has_errors = (interface_form.find('.has-error').length > 0) row.toggleClass('has-error', has_errors); var virtual = interface_form.find('.virtual').is(':checked'); var attached = interface_form.find('.attached').val(); var type = interface_form.find(...
cwe
CWE-79
JavaScript
/* ** $Id: ltm.c $ ** Tag methods ** See Copyright Notice in lua.h */ #define ltm_c #define LUA_CORE #include "lprefix.h" #include <string.h> #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "lobject.h" #include "lstate.h" #include "lstring.h" #include "ltable.h" #include "ltm.h" #i...
cwe
CWE-787
C/C++
/*! Copyright (c) REBUILD <https://getrebuild.com/> and/or its owners. All rights reserved. rebuild is dual-licensed under commercial and open source licenses (GPLv3). See LICENSE and COMMERCIAL in the project root for license information. */ package com.rebuild.core.configuration; import cn.devezhao.commons.CodecUt...
cwe
CWE-89
Java
QPDFXRefEntry::getObjStreamNumber() const { if (this->type != 2) { throw std::logic_error( "getObjStreamNumber called for xref entry of type != 2"); } return this->field1; }
cwe
CWE-787
Unknown
void PaymentRequest::Retry(mojom::PaymentValidationErrorsPtr errors) { if (!client_.is_bound() || !binding_.is_bound()) { DLOG(ERROR) << "Attempted Retry(), but binding(s) missing."; OnConnectionTerminated(); return; } if (!display_handle_) { DLOG(ERROR) << "Attempted Retry(), but display_han...
cwe
CWE-189
C/C++
void Splash::vertFlipImage(SplashBitmap *img, int width, int height, int nComps) { Guchar *lineBuf; Guchar *p0, *p1; int w; w = width * nComps; Guchar *lineBuf; Guchar *p0, *p1; int w; w = width * nComps; lineBuf = (Guchar *)gmalloc(w); p0 += width, p1 -= width) { memcpy(lineBuf,...
cwe
CWE-119
C/C++
App.Actions.DB.update_dns_record_hint = function(elm, hint) { // clean hint if (hint.trim() == '') { $(elm).parent().find('.hint').html(''); } // set domain name without rec in case of @ entries if (hint == '@') { hint = ''; } // dont show pregix if domain name = rec value ...
cwe
CWE-79
JavaScript
void server_process_native_message( Server *s, const void *buffer, size_t buffer_size, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len) { struct iovec *iovec = NULL; unsigned n = 0, m = 0, j, tn...
cwe
CWE-189
Unknown
int DummyOutStream::overrun(int itemSize, int nItems) { flush(); if (itemSize * nItems > end - ptr) nItems = (end - ptr) / itemSize; return nItems; }
cwe
CWE-122
C/C++
static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception) { char colorspace[MaxTextExtent], text[MaxTextExtent]; Image *image; IndexPacket *indexes; long type, x_offset, y, y_offset; MagickBooleanType status; MagickPixelPacket pixel; Qua...
cwe
CWE-120
C/C++
// SPDX-License-Identifier: BSD-2-Clause /* * Copyright (c) 2014, STMicroelectronics International N.V. */ #include <util.h> #include <kernel/tee_common_otp.h> #include <kernel/tee_common.h> #include <tee_api_types.h> #include <kernel/tee_ta_manager.h> #include <utee_types.h> #include <tee/tee_svc.h> #include <tee/te...
cwe
CWE-20
C/C++
package com.zrlog.service; import com.jfinal.core.JFinal; import com.zrlog.common.vo.AdminTokenVO; import com.zrlog.model.User; import com.zrlog.util.I18nUtil; import com.zrlog.util.ZrLogUtil; import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.Map; public class PluginHelper { ...
cwe
CWE-863
Java
int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) { skb_orphan(skb); if (!(dev->flags & IFF_UP)) return NET_RX_DROP; if (skb->len > (dev->mtu + dev->hard_header_len)) return NET_RX_DROP; skb_set_dev(skb, dev); skb->tstamp.tv64 = 0; skb->pkt_type = PACKET_HOST; skb->protocol = eth_type_trans...
cwe
CWE-399
C/C++
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import atexit import base64 import functools import logging import logging.config i...
cwe
CWE-434
Python
/* * tls.c - SSL/TLS/DTLS dissector * * Copyright (C) 2016-20 - ntop.org * * This file is part of nDPI, an open source deep packet inspection * library based on the OpenDPI and PACE technology by ipoque GmbH * * nDPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser...
cwe
CWE-787
C/C++
/* * Copyright 2000-2020 Vaadin Ltd. * * 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...
cwe
CWE-203
Java
package cluster import ( "context" "encoding/base64" "fmt" "io/ioutil" "os" "path" "strings" "github.com/pkg/errors" "github.com/rancher/rancher/pkg/namespace" "github.com/rancher/rancher/pkg/serviceaccounttoken" "github.com/rancher/wrangler/pkg/kubeconfig" coreV1 "k8s.io/api/core/v1" metav1 "k8s.io/apim...
cwe
CWE-331
Go
package com.salesmanager.shop.admin.controller.customers; import com.salesmanager.core.business.services.customer.CustomerService; import com.salesmanager.core.business.services.customer.attribute.CustomerAttributeService; import com.salesmanager.core.business.services.customer.attribute.CustomerOptionService; import ...
cwe
CWE-79
Java
package com.salesmanager.shop.admin.controller.shipping; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils...
cwe
CWE-639
Java
status_t BnGraphicBufferProducer::onTransact( uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { switch(code) { case REQUEST_BUFFER: { CHECK_INTERFACE(IGraphicBufferProducer, data, reply); int bufferIdx = data.readInt32(); sp<GraphicBuffer> buffer; int result = requestBuf...
cwe
CWE-200
C/C++
static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags) { int err; struct sk_buff *skb; struct sock *sk = sock->sk; err = -EIO; if (sk->sk_state & PPPOX_BOUND) goto end; msg->msg_namelen = 0; err = 0; skb = skb_recv_datagram(sk, flags & ...
cwe
CWE-20
Unknown
mysqlnd_switch_to_ssl_if_needed( MYSQLND_CONN_DATA * conn, const MYSQLND_PACKET_GREET * const greet_packet, const MYSQLND_OPTIONS * const options, unsigned long mysql_flags TSRMLS_DC ) { enum_func_status ret = FAIL; const MYSQLND_CHARSET * charset; MYSQLND_PACKET_AUTH * auth_packet; DBG_ENTER("mysq...
cwe
CWE-284
C/C++
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cwe
CWE-772
C/C++
int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) { might_sleep(); if (sta->sta_state == new_state) return 0; /* check allowed transitions first */ switch (new_state) { case IEEE80211_STA_NONE: if (sta->sta_state != IEEE80211_STA_AUTH) return -EINVAL; break; case IEE...
cwe
CWE-287
Unknown
static int read_new_config_info (WavpackContext *wpc, WavpackMetadata *wpmd) { int bytecnt = wpmd->byte_length; unsigned char *byteptr = wpmd->data; wpc->version_five = 1; // just having this block signals version 5.0 wpc->file_format = wpc->config.qmode = wpc->channel_layout = 0; if (wpc->c...
cwe
CWE-125
Unknown
function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}
cwe
CWE-79
JavaScript
recv_password_packet(Port *port) { StringInfoData buf; if (PG_PROTOCOL_MAJOR(port->proto) >= 3) { /* Expect 'p' message type */ int mtype; mtype = pq_getbyte(); if (mtype != 'p') { /* * If the client just disconnects without offering a password, * don't make a log entry. This is legal per p...
cwe
CWE-89
Unknown
function generateAutoLoginLink($params){ $dataRequest = array(); $dataRequestAppend = array(); // Destination ID if (isset($params['r'])){ $dataRequest['r'] = $params['r']; $dataRequestAppend[] = '/(r)/'.rawurlencode(base64_encode($params['r'])); } ...
cwe
CWE-116
PHP
static void inline ConvertXYZToJzazbz(const double X,const double Y, const double Z,const double white_luminance,double *Jz,double *az,double *bz) { #define Jzazbz_b 1.15 /* https://observablehq.com/@jrus/jzazbz */ #define Jzazbz_g 0.66 #define Jzazbz_c1 (3424.0/4096.0) #define Jzazbz_c2 (2413.0/128.0) #define J...
cwe
CWE-369
C/C++
int context_init(SERVICE_OPTIONS *section) { /* init TLS context */ /* create TLS context */ #if OPENSSL_VERSION_NUMBER>=0x10100000L if(section->option.client) section->ctx=SSL_CTX_new(TLS_client_method()); else /* server mode */ section->ctx=SSL_CTX_new(TLS_server_method()); if(!SSL_CTX...
cwe
CWE-295
Unknown
SPL_METHOD(Array, unserialize) { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char *buf; int buf_len; const unsigned char *p, *s; php_unserialize_data_t var_hash; zval *pmembers, *pflags = NULL; HashTable *aht; long flags; if (zend_parse_parameters(ZEND_NUM...
cwe
CWE-20
C/C++
function BasicStrategy(){ var typeConverterRegistryFromDatabase = {}; var typeConverterRegistryToDatabase = {}; var typeToDbTypeCorrespondence = {}; var dbTypeToTypeCorrespondence = {}; this.registerConverter = function(typeName, fromDatabase, toDatabase, dbType){ typeConverterRegistryFr...
cwe
CWE-89
JavaScript
recvauth_common(krb5_context context, krb5_auth_context * auth_context, /* IN */ krb5_pointer fd, char *appl_version, krb5_principal server, krb5_int32 flags, krb5_keytab keytab, /* OUT */ ...
cwe
CWE-703
C/C++
void CLua::init_libraries() { lua_stack_cleaner clean(state()); lua_pushcfunction(_state, lua_loadstring); lua_setglobal(_state, "loadstring"); // Open Crawl bindings cluaopen_kills(_state); cluaopen_you(_state); cluaopen_item(_state); cluaopen_food(_state); cluaopen_crawl(_state);...
cwe
CWE-434
Unknown
TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); TfLiteTen...
cwe
CWE-787
C/C++
function Se(e){return"function"==typeof e}
cwe
CWE-200
JavaScript
static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx); static int asn1_template_noexp...
cwe
CWE-400
Unknown
# -*- coding: utf-8 -*- # Copyright 2014 OpenMarket Ltd # # 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 l...
cwe
CWE-770
Python
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al,i,j,ret; unsigned int n; SSL3_RECORD *rr; void (*cb)(const SSL *ssl,int type2,int val)=NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_buffers(s)) return(-1); if ((type && (type != SSL3_RT_AP...
cwe
CWE-326
Unknown
static void become_daemon(const char *pidfile) { #ifndef _WIN32 pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } if (pidfile) { if (!ga_open_pidfile(pidfile)) { g_critical("failed to create pidfile")...
cwe
CWE-264
Unknown
package com.ruoyi.web.controller.system; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import or...
cwe
CWE-79
Java
static void bad_flp_intr(void) { int err_count; if (probing) { drive_state[current_drive].probed_format++; if (!next_valid_format(current_drive)) return; } err_count = ++(*errors); INFBOUND(write_errors[current_drive].badness, err_count); if (err_count > drive_params[current_drive].max_errors.abort) con...
cwe
CWE-416
Unknown
// 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 b...
cwe
CWE-681
Python
/* Mach-O support for BFD. Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. 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 Fou...
cwe
CWE-476
C/C++
CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, const char *domain, size_t domlen, unsigned char *ntlmhash, unsigned char *ntlmv2hash) { /* Unicode representation */ size_t i...
cwe
CWE-190
Unknown
static int magicmouse_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { struct magicmouse_sc *msc = hid_get_drvdata(hdev); struct input_dev *input = msc->input; int x = 0, y = 0, ii, clicks = 0, npoints; switch (data[0]) { case TRACKPAD_REPORT_ID: /* Expect four bytes of pref...
cwe
CWE-119
C/C++
decode_atype(const taginfo *t, const uint8_t *asn1, size_t len, const struct atype_info *a, void *val) { krb5_error_code ret; switch (a->type) { case atype_fn: { const struct fn_info *fn = a->tinfo; assert(fn->dec != NULL); return fn->dec(t, asn1, len, val); } c...
cwe
CWE-674
Unknown
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape); mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",disp...
cwe
CWE-79
Java
monitor_apply_keystate(struct monitor *pmonitor) { struct ssh *ssh = active_state; /* XXX */ struct kex *kex; int r; debug3("%s: packet_set_state", __func__); if ((r = ssh_packet_set_state(ssh, child_state)) != 0) fatal("%s: packet_set_state: %s", __func__, ssh_err(r)); sshbuf_free(child_state); ...
cwe
CWE-119
C/C++
void ExtensionViewGuest::DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) { if (attached() && (params.url.GetOrigin() != url_.GetOrigin())) { bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), ...
cwe
CWE-284
C/C++
protected void switchToConversation(Contact contact, String body) { Conversation conversation = xmppConnectionService .findOrCreateConversation(contact.getAccount(), contact.getJid(), false, true); switchToConversation(conversation, body); }
cwe
CWE-200
Java
package com.salesmanager.shop.admin.controller.products; import com.salesmanager.core.business.services.catalog.category.CategoryService; import com.salesmanager.core.business.services.catalog.product.ProductService; import com.salesmanager.core.business.services.catalog.product.relationship.ProductRelationshipService...
cwe
CWE-639
Java
snmpDecodePacket(SnmpRequest * rq) { struct snmp_pdu *PDU; u_char *Community; u_char *buf = rq->buf; int len = rq->len; if (!Config.accessList.snmp) { debugs(49, DBG_IMPORTANT, "WARNING: snmp_access not configured. agent query DENIED from : " << rq->from); return; } debugs(...
cwe
CWE-772
C/C++
func (p *OAuthProxy) IsValidRedirect(redirect string) bool { switch { case redirect == "": // The user didn't specify a redirect, should fallback to `/` return false case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//") && !invalidRedirectRegex.MatchString(redirect): return true case str...
cwe
CWE-601
Go
static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt) { int n; int ret; jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; long newbufsize; long newpos; assert(buf); assert(cnt >= 0); JAS_DBGLOG(100, ("mem_write(%p, %p, %d)\n", obj, buf, cnt)); newpos = m->pos_ + cnt; if (newpos > m->bufsize_ &&...
cwe
CWE-190
C/C++
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-862
PHP
xsltResolveSASCallback(xsltAttrElemPtr values, xsltStylesheetPtr style, const xmlChar *name, const xmlChar *ns, ATTRIBUTE_UNUSED const xmlChar *ignored) { xsltAttrElemPtr tmp; xsltAttrElemPtr refs; tmp = values; while (tmp != NULL) { if (tmp->set != NULL) { /* ...
cwe
CWE-119
C/C++
/** * Copyright (c) 2006-2021, JGraph Ltd * Copyright (c) 2006-2021, draw.io AG */ // urlParams is null when used for embedding window.urlParams = window.urlParams || {}; // isLocalStorage controls access to local storage window.isLocalStorage = window.isLocalStorage || false; // Disables loading settings in conf...
cwe
CWE-79
JavaScript
def _delete_host(self, host_name): """Delete a host on the storage system.""" LOG.debug(_('enter: _delete_host: host %s ') % host_name) ssh_cmd = 'svctask rmhost %s ' % host_name out, err = self._run_ssh(ssh_cmd) # No output should be returned from rmhost self._assert_s...
cwe
CWE-78
Python
protected function getNewShopUrl(Request $request, Shop $newShop) { // Remove baseUrl from request url $url = $request->getRequestUri(); $repository = $this->get(ModelManager::class)->getRepository(Shop::class); $requestShop = $repository->getActiveShopByRequestAsArray($request); ...
cwe
CWE-601
PHP
def authenticate(self, context, auth=None): """Authenticate credentials and return a token. Accept auth as a dict that looks like:: { "auth":{ "passwordCredentials":{ "username":"test_user", "password":"myp...
cwe
CWE-264
Python
public void processRequest() throws Exception { String dir = SQLInitServlet.getField("filePath") + "crf" + File.separator + "new" + File.separator; // YW 09-10-2007 << Now CRF_Design_Template_v2.xls is located at // $CATALINA_HOME/webapps/OpenClinica-instanceName/properties FormProcessor...
cwe
CWE-22
Java
package com.salesmanager.shop.admin.model.catalog; import com.salesmanager.core.model.catalog.product.availability.ProductAvailability; import com.salesmanager.core.model.catalog.product.price.ProductPriceDescription; import javax.validation.Valid; import java.util.ArrayList; import java.util.List; public class Prod...
cwe
CWE-79
Java
function K(){var b,c,d,e,f,h;if(Bc++,b=vc,a.substr(vc,2)===Pb?(c=Pb,vc+=2):(c=X,0===Bc&&g(Qb)),c!==X){for(d=[],e=vc,f=vc,Bc++,a.substr(vc,2)===Rb?(h=Rb,vc+=2):(h=X,0===Bc&&g(Sb)),Bc--,h===X?f=da:(vc=f,f=aa),f!==X?(a.length>vc?(h=a.charAt(vc),vc++):(h=X,0===Bc&&g(Eb)),h!==X?(wc=e,f=Tb(h),e=f):(vc=e,e=aa)):(vc=e,e=aa);e!...
cwe
CWE-1321
JavaScript
import os.path import re from datetime import timedelta from typing import Iterable, Optional, Tuple from urllib.parse import urlparse from django.conf import settings from django.core.files.temp import NamedTemporaryFile from django.urls import Resolver404, resolve from django.utils.translation import gettext as _ i...
cwe
CWE-434
Python
/* radare - LGPL - Copyright 2010-2021 - nibble, mrmacete, pancake */ #include <stdio.h> #include <r_types.h> #include <r_util.h> #include "mach0.h" #include <r_hash.h> // TODO: deprecate bprintf and use Eprintf (bin->self) #define bprintf if (bin->verbose) eprintf #define Eprintf if (mo->verbose) eprintf #define IS...
cwe
CWE-125
C/C++
int main(int argc, char *argv[]) { #ifdef HAVE_GUSI_H GUSISetup(GUSIwithSIOUXSockets); GUSISetup(GUSIwithInternetSockets); #endif #ifdef WITH_TCPWRAPPER // this code makes sure that the linker cannot optimize away // the DUL part of the network module where the external flags // for libwrap are de...
cwe
CWE-264
C/C++
/* * 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-787
C/C++
ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_CONST)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if ((OP1_TYPE == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) && (OP2_T...
cwe
CWE-787
Unknown
0==T?ba():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=E&&E()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,E){var J=this.getLinkForCell(E);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(u,J));if(this.isHtmlLabel(E)){var T=do...
cwe
CWE-20
JavaScript
static js_Ast *bitor(js_State *J, int notin) { js_Ast *a = bitxor(J, notin); while (jsP_accept(J, '|')) a = EXP2(BITOR, a, bitxor(J, notin)); return a; }
cwe
CWE-674
Unknown
var path = require('path'), url = require('url'), request, fs = require('fs'); var less = { version: [1, 6, 3], Parser: require('./parser').Parser, tree: require('./tree'), render: function (input, options, callback) { options = options || {}; if (typeof(options) === 'funct...
cwe
CWE-74
Java
package com.salesmanager.shop.admin.controller.content; import com.salesmanager.core.business.services.content.ContentService; import com.salesmanager.core.business.services.reference.language.LanguageService; import com.salesmanager.core.model.content.Content; import com.salesmanager.core.model.content.ContentDescrip...
cwe
CWE-639
Java
SSLNetVConnection::sslStartHandShake(int event, int &err) { if (sslHandshakeBeginTime == 0) { sslHandshakeBeginTime = Thread::get_hrtime(); // net_activity will not be triggered until after the handshake set_inactivity_timeout(HRTIME_SECONDS(SSLConfigParams::ssl_handshake_timeout_in)); } SSLConfig::sc...
cwe
CWE-284
Unknown
private void parse(UserRequest ureq) { String[] sFiles = ureq.getHttpReq().getParameterValues(FORM_ID); if (sFiles == null || sFiles.length == 0) return; files = Arrays.asList(sFiles); }
cwe
CWE-22
Java
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * 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; eit...
cwe
CWE-787
C/C++
public String findFilter( String url_suffix ) { if( url_suffix == null ) { throw new IllegalArgumentException( "The url_suffix must not be null." ); } CaptureType type = em.find( CaptureType.class, url_suffix ); if( type != null ) { ...
cwe
CWE-287
Java