code
stringlengths
10
33.4M
task
stringclasses
2 values
label
stringclasses
121 values
language
stringclasses
13 values
function Se(e){return"function"==typeof e}
cwe
CWE-451
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-190
C/C++
QInt16() {}
cwe
CWE-908
C/C++
{actionList.map((action) => { return <a href={action.url} class={`btn btn-default btn-sm`} target="_blank"><i class={`fa fa-${action.icon}`} /> {action.name}</a>; })}
cwe
CWE-200
JavaScript
lyd_new_leaf(struct lyd_node *parent, const struct lys_module *module, const char *name, const char *val_str) { const struct lys_node *snode = NULL, *siblings; if ((!parent && !module) || !name) { LOGARG; return NULL; } siblings = lyd_new_find_schema(parent, module, 0); if (!siblin...
cwe
CWE-119
Unknown
xsltNumberFormatGetMultipleLevel(xsltTransformContextPtr context, xmlNodePtr node, xsltCompMatchPtr countPat, xsltCompMatchPtr fromPat, double *array, int max) { int amount = 0; int cnt; xmlNodePtr ancestor; xmlNodePtr preceding; xmlXPathParserContextPtr parser; context...
cwe
CWE-119
Unknown
void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin, UINT32 trusted_mask[]) { tBTM_SEC_DEV_REC *p_dev_rec; BTM_TRACE_API ("BTM_PINCodeReply(): PairState: %s PairFlags: 0x%02x PinLen:%d Result:%d", btm_pair_state_descr(btm_cb.pairing_state), btm_cb.pairing_flag...
cwe
CWE-264
C/C++
static bool inRange(cchar *expr, cchar *version) { char *cp, *op, *base, *pre, *low, *high, *preVersion; int64 min, max, numberVersion; ssize i; if ((i = strspn(expr, "<>=~ \t")) > 0) { op = snclone(expr, i); expr = &expr[i]; } else { op = 0; } if (smatch(expr...
cwe
CWE-476
C/C++
init_device (u2fh_devs * devs, struct u2fdevice *dev) { unsigned char resp[1024]; unsigned char nonce[8]; if (obtain_nonce(nonce) != 0) { return U2FH_TRANSPORT_ERROR; } size_t resplen = sizeof (resp); dev->cid = CID_BROADCAST; if (u2fh_sendrecv (devs, dev->id, U2FHID_INIT, nonce, sizeof...
cwe
CWE-908
C/C++
/* * netbios.c * * Copyright (C) 2011-21 - ntop.org * Copyright (C) 2009-11 - ipoque GmbH * * 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...
cwe
CWE-787
C/C++
# -*- 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-305
Python
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* start = GetInput(context, node, kStartTensor); const TfLiteTensor* limit = GetInput(context, node, kLimitTensor); const TfLiteT...
cwe
CWE-125
C/C++
void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg) { struct reply_info* rep = (struct reply_info*)msg->entry.data; if(!rep) return; /* if error or no answers */ if(FLAGS_GET_RCODE(rep->flags) != 0 || rep->an_numrrsets == 0) { struct delegpt_ns* ns = delegpt_find_ns(dp, msg->key.qname, m...
cwe
CWE-400
Unknown
function output( $p_format = 'dot', $p_headers = false ) { # Check if it is a recognized format. if( !isset( $this->formats[$p_format] ) ) { trigger_error( ERROR_GENERIC, ERROR ); } $t_binary = $this->formats[$p_format]['binary']; $t_type = $this->formats[$p_format]['type']; $t_mime = $this->formats[$p_...
cwe
CWE-78
PHP
package com.salesmanager.shop.admin.controller.customers; import com.fasterxml.jackson.databind.ObjectMapper; import com.salesmanager.core.business.services.customer.attribute.CustomerOptionService; import com.salesmanager.core.business.services.customer.attribute.CustomerOptionSetService; import com.salesmanager.core...
cwe
CWE-639
Java
static int FNAME(update_accessed_dirty_bits)(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, struct guest_walker *walker, gpa_t addr, int write_fault) { unsigned level, index; pt_element_t pte, orig_pte; pt_element_t __user *ptep_user; gfn_t table_gfn; int ret; /* dirty/accessed bits ar...
cwe
CWE-416
Unknown
int imap_open_connection(struct ImapAccountData *adata) { if (mutt_socket_open(adata->conn) < 0) return -1; adata->state = IMAP_CONNECTED; if (imap_cmd_step(adata) != IMAP_RES_OK) { imap_close_connection(adata); return -1; } if (mutt_str_startswith(adata->buf, "* OK", CASE_IGNORE)) { if...
cwe
CWE-74
Unknown
def read_primary_locale_file primary_file = "#{self.locales_config_path}/#{self.primary_locale_name}.yml" File.exists?(primary_file) ? flat_hash(YAML::load(IO.read(primary_file))[self.primary_locale_name]) : {} end
cwe
CWE-502
Ruby
package com.salesmanager.shop.model.catalog.product.attribute; import java.util.ArrayList; import java.util.List; import com.salesmanager.shop.model.catalog.product.attribute.api.ReadableProductOptionValueEntity; public class ReadableProductOption extends ProductOption { /** * */ private static final long se...
cwe
CWE-79
Java
void RenderFrameHostImpl::RegisterMojoInterfaces() { #if !defined(OS_ANDROID) registry_->AddInterface(base::Bind(&InstalledAppProviderImplDefault::Create)); #endif // !defined(OS_ANDROID) PermissionControllerImpl* permission_controller = PermissionControllerImpl::FromBrowserContext( GetProcess()->...
cwe
CWE-189
C/C++
package io.swagger.codegen.languages; import io.swagger.codegen.*; import io.swagger.codegen.languages.features.BeanValidationFeatures; import io.swagger.models.Operation; import java.util.*; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; public class JavaJerseyServerCode...
cwe
CWE-200
Java
int main(int argc, char *argv[]) { p_fm_config_conx_hdlt hdl; int instance = 0; fm_mgr_config_errno_t res; char *rem_addr = NULL; char *community = "public"; char Opts[256]; int arg; char *command; int i; /* Get options at the command line (overide default...
cwe
CWE-362
Unknown
ews_config_utils_try_credentials_sync (ECredentialsPrompter *prompter, ESource *source, const ENamedParameters *credentials, gboolean *out_authenticated, gpointer user_data, GCancellable *cancellable, GError **error) { TryCredentialsData *data = user_da...
cwe
CWE-295
Unknown
archive_string_append_from_wcs(struct archive_string *as, const wchar_t *w, size_t len) { (void)as;/* UNUSED */ (void)w;/* UNUSED */ (void)len;/* UNUSED */ errno = ENOSYS; return (-1); }
cwe
CWE-787
Unknown
xmlBufCreateSize(size_t size) { xmlBufPtr ret; ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); if (ret == NULL) { xmlBufMemoryError(NULL, "creating buffer"); return(NULL); } ret->compat_use = 0; ret->use = 0; ret->error = 0; ret->buffer = NULL; ret->alloc = xmlBufferAllocSchem...
cwe
CWE-190
Unknown
start_vrrp_child(void) { #ifndef _DEBUG_ pid_t pid; char *syslog_ident; /* Initialize child process */ if (log_file_name) flush_log_file(); pid = fork(); if (pid < 0) { log_message(LOG_INFO, "VRRP child process: fork error(%s)" , strerror(errno)); return -1; } else if (pid) { vrrp_child = pi...
cwe
CWE-200
Unknown
package com.salesmanager.shop.admin.model.permission; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPrope...
cwe
CWE-79
Java
/** * URL parser module. * * @license MIT * @version 2.0.0 * @author Dumitru Uzun (DUzun.Me) * @umd AMD, Browser, CommonJs, noDeps */ export { default } from './url/URL';
cwe
CWE-20
JavaScript
imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method) { char ibuf[LONG_STRING*2], obuf[LONG_STRING]; unsigned char hmac_response[MD5_DIGEST_LEN]; int len; int rc; if (!mutt_bit_isset (idata->capabilities, ACRAM_MD5)) return IMAP_AUTH_UNAVAIL; mutt_message _("Authenticating (CRAM-MD...
cwe
CWE-120
C/C++
void ServerSecurityFeature::collectOptions(std::shared_ptr<ProgramOptions> options) { options->addOption("--server.harden", "lock down REST APIs that reveal version information or server " "internals for non-admin users", new BooleanParameter(&_hardenedRe...
cwe
CWE-918
C/C++
name : function(file1, file2) { var self = elFinder.prototype._sortRules.name; if (typeof self.loc == 'undefined') { self.loc = (navigator.userLanguage || navigator.browserLanguage || navigator.language || 'en-US'); } if (typeof self.sort == 'undefined') { if ('11'.localeCompare('2', self.loc, {nume...
cwe
CWE-89
JavaScript
amgtar_restore( application_argument_t *argument) { char *cmd; GPtrArray *argv_ptr = g_ptr_array_new(); char **env; int j; char *e; char *include_filename = NULL; char *exclude_filename = NULL; if (!gnutar_path) { error(_("GNUTAR-PATH not defin...
cwe
CWE-264
Unknown
public ExitCode runWithoutHelp(CommandRunnerParams params) throws IOException, InterruptedException { if (saveFilename != null && loadFilename != null) { params.getConsole().printErrorText("Can't use both --load and --save"); return ExitCode.COMMANDLINE_ERROR; } if (saveFilename != null)...
cwe
CWE-502
Java
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cwe
CWE-119
C/C++
# -*- 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-74
Python
static int megasas_handle_dcmd(MegasasState *s, MegasasCmd *cmd) { int opcode, len; int retval = 0; const struct dcmd_cmd_tbl_t *cmdptr = dcmd_cmd_tbl; opcode = le32_to_cpu(cmd->frame->dcmd.opcode); trace_megasas_handle_dcmd(cmd->index, opcode); len = megasas_map_dcmd(s, cmd); if (len < 0) ...
cwe
CWE-401
Unknown
static bigint *sig_verify(BI_CTX *ctx, const uint8_t *sig, int sig_len, bigint *modulus, bigint *pub_exp) { int i, size; bigint *decrypted_bi, *dat_bi; bigint *bir = NULL; uint8_t *block = (uint8_t *)malloc(sig_len); /* decrypt */ dat_bi = bi_import(ctx, sig, sig_len); ctx-...
cwe
CWE-347
C/C++
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
CWE-476
C/C++
ec_p_init (mpi_ec_t ctx, enum gcry_mpi_ec_models model, enum ecc_dialects dialect, int flags, gcry_mpi_t p, gcry_mpi_t a, gcry_mpi_t b) { int i; static int use_barrett; if (!use_barrett) { if (getenv ("GCRYPT_BARRETT")) use_barrett = 1; else use_ba...
cwe
CWE-200
Unknown
func (cf *clientsFactory) UpdateNamespaces(ctx context.Context) error { clients, err := clientsForClusters(cf.clusters.Get()) if err != nil { cf.log.Error(err, "failed to create clients for", "clusters", cf.clusters.Get()) return err } cf.syncCaches() wg := sync.WaitGroup{} for clusterName, c := range clie...
cwe
CWE-532
Go
void Utterance::FinishAndDestroy() { completion_task_->Run(); completion_task_ = NULL; delete this; }
cwe
CWE-20
C/C++
package proxyutil import ( "context" "errors" "log" "net/http" "net/http/httputil" "strings" "time" glog "github.com/grafana/grafana/pkg/infra/log" ) // StatusClientClosedRequest A non-standard status code introduced by nginx // for the case when a client closes the connection while nginx is processing // th...
cwe
CWE-200
Go
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/ory/fosite/handler/oauth2 (interfaces: AuthorizeCodeStorage) // 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
VOID ixheaacd_esbr_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x, const WORD32 *pdig_rev_tbl, WORD32 npoints) { WORD32 i, k; WORD32 h2; WORD32 x_0, x_1, x_2, x_3; WORD32 x_4, x_5, x_6, x_7; WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f; WORD32 n00, n10, n20, n30, n...
cwe
CWE-787
C/C++
function createSection(name, inside) { var extendecInside = {}; extendecInside['section-header'] = { pattern: /^ ?\*{3}.+?\*{3}/, alias: 'keyword' }; // copy inside tokens for (var token in inside) { extendecInside[token] = inside[token]; } extendecInside['tag'] = { pattern: /([\r\n](?: |\...
cwe
CWE-400
JavaScript
/* * Performance events core code: * * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de> * Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra * Copyright © 2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com> * * For licensing details see kernel...
cwe
CWE-416
C/C++
AvahiDnsPacket *avahi_recv_dns_packet_ipv6( int fd, AvahiIPv6Address *ret_src_address, uint16_t *ret_src_port, AvahiIPv6Address *ret_dst_address, AvahiIfIndex *ret_iface, uint8_t *ret_ttl) { AvahiDnsPacket *p = NULL; struct msghdr msg; struct iovec io; si...
cwe
CWE-399
Unknown
/** @file parse_rawml.c * @brief Functions for parsing rawml markup * * Copyright (c) 2020 Bartek Fabiszewski * http://www.fabiszewski.net * * This file is part of libmobi. * Licensed under LGPL, either version 3, or any later. * See <http://www.gnu.org/licenses/> */ #define _GNU_SOURCE 1 #ifndef __USE_BSD #...
cwe
CWE-125
C/C++
NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size) { struct asn1_data *asn1 = asn1_init(NULL); int size; NT_STATUS_HAVE_NO_MEMORY(asn1); asn1->data = blob.data; asn1->length = blob.length; asn1_start_tag(asn1, tag); if (asn1->has_error) { talloc_free(asn1); return STATUS_MORE_ENTRIES;...
cwe
CWE-399
Unknown
static PyObject *__pyx_f_17clickhouse_driver_14bufferedwriter___pyx_unpickle_CompressedBufferedWriter__set_state(struct __pyx_obj_17clickhouse_driver_14bufferedwriter_CompressedBufferedWriter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__p...
cwe
CWE-120
C/C++
# Generated by Django 3.2.5 on 2021-10-25 02:08 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import order.models import markdownx.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_U...
cwe
CWE-400
Python
inline TfLiteTensor* GetTemporary(TfLiteContext* context, const TfLiteNode* node, int index) { return &context->tensors[node->temporaries->data[index]]; }
cwe
CWE-125
Unknown
#!/usr/bin/python -tt # 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that ...
cwe
CWE-59
Python
/** * Copyright (c) 2006-2020, JGraph Ltd * Copyright (c) 2006-2020, draw.io AG */ /** * Constructs a new point for the optional x and y coordinates. If no * coordinates are given, then the default values for <x> and <y> are used. * @constructor * @class Implements a basic 2D point. Known subclassers = {@link m...
cwe
CWE-94
JavaScript
/* * linux/fs/lockd/svc.c * * This is the central lockd service. * * FIXME: Separate the lockd NFS server functionality from the lockd NFS * client functionality. Oh why didn't Sun create two separate * services in the first place? * * Authors: Olaf Kirch (okir@monad.swb.de) * * Copyright (C) 1995, 1996...
cwe
CWE-404
C/C++
function getValueIgnoringKeyCase(obj, lookedKey) { return Object.keys(obj) .map(presentKey => presentKey.toLowerCase() === lookedKey.toLowerCase() ? obj[presentKey] : null) .filter(item => item)[0]; } module.exports.parse = (event, spotText) => { const boundary = getValueIgnoringKeyCase(event.h...
cwe
CWE-20
JavaScript
static int dns_stream_complete(DnsStream *s, int error) { assert(s); #if ENABLE_DNS_OVER_TLS if (s->encrypted) { int r; r = dnstls_stream_shutdown(s, error); if (r != -EAGAIN) dns_stream_stop(s); } else #endif ...
cwe
CWE-703
C/C++
DefaultResetPasswordRequestResponse(UserReference reference, InternetAddress userEmail, String verificationCode) { this.userReference = reference; this.userEmail = userEmail; this.verificationCode = verificationCode; }
cwe
CWE-640
Java
static long snd_rawmidi_kernel_write1(struct snd_rawmidi_substream *substream, const unsigned char __user *userbuf, const unsigned char *kernelbuf, long count) { unsigned long flags; long count1, result; struct snd_rawmidi_runtime *runtime = substream->runtime; unsigned long appl_ptr; ...
cwe
CWE-416
Unknown
int HexInStream::pos() { return offset + ptr - start; }
cwe
CWE-787
C/C++
/* * Copyright (c) 2004-2021, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of cond...
cwe
CWE-918
Java
static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, int completion) { int dir; size_t len = 0; const char *str = NULL; int pid; int ret; int i; USBDevice *dev; USBEndpoint *ep; struct ohci_iso_td iso_td; uint32_t addr; uint16_t s...
cwe
CWE-835
Unknown
static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) { int ret; struct binder_transaction *t; struct binder_work *w; struct binder_work *tcomplete; binder_size_t *offp, *...
cwe
CWE-416
Unknown
static ssize_t _hostsock_writev( oe_fd_t* desc, const struct oe_iovec* iov, int iovcnt) { ssize_t ret = -1; sock_t* sock = _cast_sock(desc); void* buf = NULL; size_t buf_size = 0; if (!sock || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX) OE_RAISE_ERRNO(OE_EINVAL); /* Flatten ...
cwe
CWE-200
Unknown
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/ory/fosite (interfaces: Hasher) // Package internal is a generated GoMock package. package internal import ( context "context" reflect "reflect" gomock "github.com/golang/mock/gomock" ) // MockHasher is a mock of Hasher interface type MockHasher st...
cwe
CWE-287
Go
public function sMailCampaignsGetDetail($id) { $sql = " SELECT * FROM s_campaigns_mailings WHERE id=$id "; $getCampaigns = $this->db->fetchRow($sql); if (!$getCampaigns) { return false; } // Fetch all positions $sql = " ...
cwe
CWE-79
PHP
/* Copyright 2020 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
Status genTableRowsForSqliteTable(const fs::path& sqlite_db, const std::string& sqlite_query, TableRows& results, bool respect_locking) { sqlite3* db = nullptr; if (!pathExists(sqlite_db).ok()) { return Status(...
cwe
CWE-295
Unknown
/* * Copyright (c) 2018-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <fizz/record/EncryptedRecordLayer.h> #include <fizz/crypto/aead/IOBufUtil.h> namespace fizz {...
cwe
CWE-770
C/C++
package com.salesmanager.shop.admin.controller.user; import com.salesmanager.core.business.services.reference.country.CountryService; import com.salesmanager.core.business.services.user.GroupService; import com.salesmanager.core.business.services.user.PermissionService; import com.salesmanager.core.business.utils.ajax...
cwe
CWE-79
Java
static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) { struct jbg_dec_state decoder; int decodeStatus = 0; unsigned char* pImage = NULL; (void) size, (void) s; if (isFillOrder(tif, tif->tif_dir.td_fillorder)) { TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdatasize); } jbg_dec_init(&deco...
cwe
CWE-787
C/C++
esis_print(netdissect_options *ndo, const uint8_t *pptr, u_int length) { const uint8_t *optr; u_int li,esis_pdu_type,source_address_length, source_address_number; const struct esis_header_t *esis_header; if (!ndo->ndo_eflag) ND_PRINT((ndo, "ES-IS")); if (length <= 2) { ND_PRINT((ndo, ndo->ndo_qfla...
cwe
CWE-125
Unknown
# coding=utf-8 import calendar import datetime import logging import subprocess import time from importlib import import_module import flask_login import os from dateutil.parser import parse as date_parse from flask import Response from flask import flash from flask import jsonify from flask import redirect from flask...
cwe
CWE-22
Python
int prepare_binprm(struct linux_binprm *bprm) { struct inode *inode = file_inode(bprm->file); umode_t mode = inode->i_mode; int retval; /* clear any previous set[ug]id data from a previous binary */ bprm->cred->euid = current_euid(); bprm->cred->egid = current_egid(); if (!(bprm->file->f_path.mnt->mnt_flags ...
cwe
CWE-362
C/C++
/* Copyright 2016 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-908
Python
TfLiteStatus PrepareHashtableFind(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input_resource_id_tensor = GetInput(context, node, kInputResourceIdTensor); TF_LITE_ENSURE_EQ(context, input_r...
cwe
CWE-125
C/C++
package io.socket.client; import io.socket.backo.Backoff; import io.socket.emitter.Emitter; import io.socket.parser.DecodingException; import io.socket.parser.IOParser; import io.socket.parser.Packet; import io.socket.parser.Parser; import io.socket.thread.EventThread; import okhttp3.Call; import okhttp3.WebSocket; i...
cwe
CWE-476
Java
/* * QEMU paravirtual RDMA - Device rings * * Copyright (C) 2018 Oracle * Copyright (C) 2018 Red Hat Inc * * Authors: * Yuval Shaia <yuval.shaia@oracle.com> * Marcel Apfelbaum <marcel@redhat.com> * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in t...
cwe
CWE-824
C/C++
static int _hostsock_getsockname( oe_fd_t* sock_, struct oe_sockaddr* addr, oe_socklen_t* addrlen) { int ret = -1; sock_t* sock = _cast_sock(sock_); oe_socklen_t addrlen_in = 0; oe_errno = 0; if (!sock) OE_RAISE_ERRNO(OE_EINVAL); if (addrlen) addrlen_in = *addrlen;...
cwe
CWE-552
Unknown
QTN2QT(QTNode *in) { TSQuery out; int len; int sumlen = 0, nnode = 0; QTN2QTState state; cntsize(in, &sumlen, &nnode); len = COMPUTESIZE(nnode, sumlen); out = (TSQuery) palloc0(len); SET_VARSIZE(out, len); out->size = nnode; state.curitem = GETQUERY(out); state.operand = state.curoperand = ...
cwe
CWE-189
C/C++
static void nodeDestruct(struct SaveNode* node) { if (node->v == &node->sorted) { tr_free(node->sorted.val.l.vals); } }
cwe
CWE-284
Unknown
function addEntryHandler(cat, entry, subCat) { mxEvent.addListener(entry, 'click', function() { if (currentEntry != entry) { currentEntry.style.backgroundColor = ''; currentEntry = entry; currentEntry.style.backgroundColor = leftHighlight; div.scrollTop = 0; div.innerHTML ...
cwe
CWE-94
JavaScript
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { const CTCBeamSearchDecoderParams* option = reinterpret_cast<CTCBeamSearchDecoderParams*>(node->user_data); const int top_paths = option->top_paths; TF_LITE_ENSURE(context, option->beam_width >= top_paths); TF_LITE_ENSURE_EQ(context, NumInput...
cwe
CWE-787
C/C++
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- modul...
cwe
CWE-116
C/C++
package server import ( "context" "crypto/tls" "fmt" "io/fs" "math" "net" "net/http" "net/url" "os" "os/exec" "path" "reflect" "regexp" go_runtime "runtime" "strings" gosync "sync" "time" // nolint:staticcheck golang_proto "github.com/golang/protobuf/proto" "github.com/argoproj/pkg/sync" "github...
cwe
CWE-79
Go
static int fuse_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int flags) { struct inode *inode = d_inode(path->dentry); struct fuse_conn *fc = get_fuse_conn(inode); if (!fuse_allow_current_process(fc)) { if (!request_mask) { /* * If user explicitly requested *nothing* t...
cwe
CWE-459
Unknown
/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Copyright @ 2015 Atlassian Pty 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.or...
cwe
CWE-20
Java
SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC) { if (sapi_module.getenv) { char *value, *tmp = sapi_module.getenv(name, name_len TSRMLS_CC); if (tmp) { value = estrdup(tmp); } else { return NULL; } if (sapi_module.input_filter) { sapi_module.input_filter(PARSE_STRING, name, &valu...
cwe
CWE-601
Unknown
static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) { struct kvm_kernel_irq_routing_entry *e; struct kvm_irq_routing_table *irq_rt; struct kvm_lapic_irq irq; struct kvm_vcpu *vcpu; struct vcpu_data vcpu_info; int idx, ret = -EINVAL; if (!kvm_arch_has...
cwe
CWE-20
C/C++
bool GraphicsContext3D::getImageData(Image* image, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool ignoreGammaAndColorProfile, ...
cwe
CWE-399
C/C++
user: function (next) { User.create( { username: postData.username, email: postData.email, password: postData.password, fullname: postData.fullname, title: postData.title, role: postData.role, accessToken: chance.hash(...
cwe
CWE-521
JavaScript
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % L AAA Y Y EEEEE RRRR ...
cwe
CWE-369
C/C++
static int sysMapBlockFile(FILE* mapf, MemMapping* pMap) { char block_dev[PATH_MAX+1]; size_t size; unsigned int blksize; unsigned int blocks; unsigned int range_count; unsigned int i; if (fgets(block_dev, sizeof(block_dev), mapf) == NULL) { LOGW("failed to read block device fro...
cwe
CWE-189
C/C++
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ldap import ( "errors" "gopkg.in/asn1-ber.v1" ) // SimpleBindRequest represents a username/password bind operation type SimpleBindRequest struct { ...
cwe
CWE-255
Go
function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"function"!=typeof b()(e)?{}:x()(b()(e).call(e)).reduce((function(e,t){var n=m()(t,2),r=n[0],a=n[1];return e[r]=X(a),e}),{})}
cwe
CWE-601
JavaScript
static void write_outfile(QPDF& pdf, Options& o) { if (o.split_pages) { // Generate output file pattern std::string before; std::string after; size_t len = strlen(o.outfilename); char* num_spot = strstr(const_cast<char*>(o.outfilename), "%d"); if (num_spot != 0) ...
cwe
CWE-787
Unknown
package com.salesmanager.shop.admin.controller.configurations; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; impor...
cwe
CWE-79
Java
var doSynchronize = function(requisition, rescanExisting) { RequisitionsService.startTiming(); RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then( function() { // success growl.success('The import operation has been started for ' + re...
cwe
CWE-79
JavaScript
function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
cwe
CWE-331
JavaScript
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
cwe
CWE-200
C/C++