code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static void raw_refresh_limits(BlockDriverState *bs, Error **errp)
{
BDRVRawState *s = bs->opaque;
struct stat st;
if (!fstat(s->fd, &st)) {
if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) {
int ret = hdev_get_max_transfer_length(bs, s->fd);
if (ret > 0 && ret <= BDRV_REQUEST... | vuln | Vulnerable | C/C++ |
public function delete($id)
{
$currentUser = $this->ACL->getUser();
if (empty($currentUser['role']['perm_admin'])) {
$params['conditions'] = ['organisation_id' => $currentUser['organisation_id']];
}
$this->CRUD->delete($id, $params);
$responsePayload = $this->CRUD... | vuln | Safe | PHP |
static int img_snapshot(int argc, char **argv)
{
BlockDriverState *bs;
QEMUSnapshotInfo sn;
char *filename, *snapshot_name = NULL;
int c, ret = 0, bdrv_oflags;
int action = 0;
qemu_timeval tv;
bool quiet = false;
bdrv_oflags = BDRV_O_FLAGS | BDRV_O_RDWR;
for(;;) {
c = ge... | vuln | Vulnerable | C/C++ |
static always_inline void gen_sradi (DisasContext *ctx, int n)
{
int sh = SH(ctx->opcode) + (n << 5);
if (sh != 0) {
int l1, l2;
TCGv t0;
l1 = gen_new_label();
l2 = gen_new_label();
t0 = tcg_temp_local_new(TCG_TYPE_TL);
tcg_gen_brcondi_tl(TCG_COND_GE, cpu_gpr[rS(c... | vuln | Safe | C/C++ |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* 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 app... | vuln | Safe | Java |
static int coroutine_fn blkreplay_co_flush(BlockDriverState *bs)
{
uint64_t reqid = blkreplay_next_id();
int ret = bdrv_co_flush(bs->file->bs);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();
return ret;
} | vuln | Safe | C/C++ |
/*
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
di... | vuln | Vulnerable | Go |
lldp_decode(struct lldpd *cfg, char *frame, int s,
struct lldpd_hardware *hardware,
struct lldpd_chassis **newchassis, struct lldpd_port **newport)
{
struct lldpd_chassis *chassis;
struct lldpd_port *port;
const char lldpaddr[] = LLDP_MULTICAST_ADDR;
const char dot1[] = LLDP_TLV_ORG_DOT1;
const char dot3[]... | vuln | Vulnerable | Unknown |
#include "gd.h"
#include <cmath>
#include <cstring>
#include <cstdlib>
#include "gdhelpers.h"
#include "hphp/runtime/base/memory-manager.h"
using std::abs;
#ifdef _OSD_POSIX /* BS2000 uses the EBCDIC char set instead of ASCII */
#define CHARSET_EBCDIC
#define __attribute__(any) /*nothing */
#endif
/*_OSD_POSIX*... | vuln | Vulnerable | C/C++ |
def fast_forward_to_first_boundary
loop do
read_buffer = @io.gets
break if read_buffer == full_boundary
raise EOFError, "bad content body" if read_buffer.nil?
end
end | vuln | Vulnerable | Ruby |
static OPJ_BOOL opj_j2k_write_sod(opj_j2k_t *p_j2k,
opj_tcd_t * p_tile_coder,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 p_total_data_size,
... | vuln | Safe | Unknown |
static unsigned tget_long(const uint8_t **p, int le)
{
unsigned v = le ? AV_RL32(*p) : AV_RB32(*p);
*p += 4;
return v;
} | vuln | Vulnerable | C/C++ |
void fp12_write_bin(uint8_t *bin, int len, const fp12_t a, int pack) {
fp12_t t;
fp12_null(t);
RLC_TRY {
fp12_new(t);
if (pack) {
if (len != 8 * RLC_FP_BYTES) {
RLC_THROW(ERR_NO_BUFFER);
}
fp12_pck(t, a);
fp2_write_bin(bin, 2 * RLC_FP_BYTES, a[0][1], 0);
fp2_write_bin(bin + 2 * RLC_FP_BYTES... | vuln | Vulnerable | C/C++ |
uint64_t ThreadCommand::pc() const {
uint64_t entry = 0;
switch(architecture_) {
case CPU_TYPES::CPU_TYPE_X86:
{
entry = reinterpret_cast<const details::x86_thread_state_t*>(state_.data())->eip;
break;
}
case CPU_TYPES::CPU_TYPE_X86_64:
{
entry = reinterpret_cast<c... | vuln | Vulnerable | Unknown |
def __init__(self, wsgidav_app, next_app, config):
super().__init__(wsgidav_app, next_app, config)
self.dir_config = util.get_dict_value(config, "dir_browser", as_dict=True)
# mount path must be "" or start (but not end) with '/'
self.mount_path = config.get("mount_path") or ""
... | vuln | Vulnerable | Python |
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){re... | vuln | Vulnerable | JavaScript |
WORD32 ihevcd_create(iv_obj_t *ps_codec_obj,
void *pv_api_ip,
void *pv_api_op)
{
ihevcd_cxa_create_ip_t *ps_create_ip;
ihevcd_cxa_create_op_t *ps_create_op;
WORD32 ret;
codec_t *ps_codec;
ps_create_ip = (ihevcd_cxa_create_ip_t *)pv_api_i... | vuln | Safe | C/C++ |
static int ehci_process_itd(EHCIState *ehci,
EHCIitd *itd,
uint32_t addr)
{
USBDevice *dev;
USBEndpoint *ep;
uint32_t i, len, pid, dir, devaddr, endp;
uint32_t pg, off, ptr1, ptr2, max, mult;
ehci->periodic_sched_active = PERIODIC_ACTIVE;
... | vuln | Vulnerable | C/C++ |
vmxnet3_io_bar0_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VMXNET3State *s = opaque;
if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_TXPROD,
VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) {
int tx_queue_idx =
VMW_MULTIREG_IDX_... | vuln | Vulnerable | Unknown |
static pj_status_t respond_digest( pj_pool_t *pool,
pjsip_digest_credential *cred,
const pjsip_digest_challenge *chal,
const pj_str_t *uri,
const pjsip_cred_info *cred_info,
const pj_str_t *cnonce,
pj_uint32_t nc,
const pj_str_t *method)
{
const pj_str_t pjsip_AKAv1_... | vuln | Vulnerable | Unknown |
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either ... | vuln | Vulnerable | Go |
@SuppressLint("StringFormatInvalid")
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_filepicker);
AppCompatImageButton mBack = findViewById(R.id.back);
AppCompatImageButton mSortButton ... | vuln | Vulnerable | Java |
MagickExport MagickBooleanType ContrastStretchImage(Image *image,
const double black_point,const double white_point,ExceptionInfo *exception)
{
#define MaxRange(color) ((double) ScaleQuantumToMap((Quantum) (color)))
#define ContrastStretchImageTag "ContrastStretch/Image"
CacheView
*image_view;
double
... | vuln | Safe | C/C++ |
@app.route('/delete_crawl', methods=['POST'])
@is_logged_in
def delete_crawl():
# Get Form Fields
cid = request.form['cid']
# Create cursor
cur = mysql.connection.cursor()
# Get user by username
result = cur.execute("DELETE FROM Crawls WHERE cid = %s" % cid)
#... | vuln | Vulnerable | Python |
TPMT_TK_VERIFIED_Unmarshal(TPMT_TK_VERIFIED *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPM_ST_Unmarshal(&target->tag, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
if (target->tag != TPM_ST_VERIFIED) {
rc = TPM_RC_TAG;
}
}
if (... | vuln | Vulnerable | Unknown |
static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)
{
__u8 pkt_type;
pkt_type = *((__u8 *) skb->data);
skb_pull(skb, 1);
switch (pkt_type) {
case HCI_EVENT_PKT:
case HCI_ACLDATA_PKT:
case HCI_SCODATA_PKT:
case HCI_ISODATA_PKT:
hci_skb_pkt_type(skb) = pkt_type;
hci_recv_frame(vb... | vuln | Vulnerable | C/C++ |
auth_delkeys(void)
{
symkey * sk;
ITER_DLIST_BEGIN(key_listhead, sk, llink, symkey)
if (sk->keyid > NTP_MAXKEY) { /* autokey */
continue;
}
/*
* Don't lose info as to which keys are trusted.
*/
if (KEY_TRUSTED & sk->flags) {
if (sk->secret != NULL) {
memset(sk->secret, '\0', sk->secretsize);... | vuln | Vulnerable | Unknown |
bool PulseAudioMixer::Init(InitDoneCallback* callback) {
if (!InitThread())
return false;
thread_->message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(this, &PulseAudioMixer::DoInit, callback));
return true;
} | vuln | Vulnerable | C/C++ |
stop_insert(
pos_T *end_insert_pos,
int esc, // called by ins_esc()
int nomove) // <c-\><c-o>, don't move cursor
{
int cc;
char_u *ptr;
stop_redo_ins();
replace_flush(); // abandon replace stack
/*
* Save the inserted text for later redo with ^@ and CTRL-A.
* Don't do... | vuln | Vulnerable | Unknown |
/*! lazysizes - v5.2.0 */
!function(a,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,functio... | vuln | Vulnerable | JavaScript |
static int
same_leader(
linenr_T lnum,
int leader1_len,
char_u *leader1_flags,
int leader2_len,
char_u *leader2_flags)
{
int idx1 = 0, idx2 = 0;
char_u *p;
char_u *line1;
char_u *line2;
if (leader1_len == 0)
return (leader2_len == 0);
char_u *lnum_line = ... | vuln | Safe | C/C++ |
static void gen_wrtee(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
t0 = tcg_temp_new();
tcg_gen_andi_tl(t0, cpu_gpr[rD(ctx->op... | vuln | Vulnerable | C/C++ |
_eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags,
size_t dsthdr_offset,
struct ip6_ext_hdr *ext_hdr,
struct in6_address *src_addr)
{
size_t bytes_left = (ext_hdr->ip6r_len + 1) * 8 - sizeof(*ext_hdr);
struct ip6_option_hdr op... | vuln | Vulnerable | C/C++ |
const std::string& get_tenant() const {
ceph_assert(t != Wildcard);
return u.tenant;
} | vuln | Vulnerable | Unknown |
static int usb_console_setup(struct console *co, char *options)
{
struct usbcons_info *info = &usbcons_info;
int baud = 9600;
int bits = 8;
int parity = 'n';
int doflow = 0;
int cflag = CREAD | HUPCL | CLOCAL;
char *s;
struct usb_serial *serial;
struct usb_serial_port *port;
int retval;
struct tty_struct *tt... | vuln | Safe | C/C++ |
def _checkPolkitPrivilege(self, sender, conn, privilege):
# from jockey
"""
Verify that sender has a given PolicyKit privilege.
sender is the sender's (private) D-BUS name, such as ":1:42"
(sender_keyword in @dbus.service.methods). conn is
the dbus.Connection object (con... | vuln | Safe | Python |
/*
* Univention Directory Notifier
*
* Copyright 2004-2019 Univention GmbH
*
* http://www.univention.de/
*
* All rights reserved.
*
* The source code of this program is made available
* under the terms of the GNU Affero General Public License version 3
* (GNU AGPL V3) as published by the Free Software Founda... | vuln | Safe | C/C++ |
int ssl_parse_clienthello_use_srtp_ext(SSL *s, unsigned char *d, int len,int *al)
{
SRTP_PROTECTION_PROFILE *sprof;
STACK_OF(SRTP_PROTECTION_PROFILE) *srvr;
int ct;
int mki_len;
int i, srtp_pref;
unsigned int id;
/* Length value + the MKI length */
if(len < 3)
{
SS... | vuln | Safe | Unknown |
default S unsafeWrite(long address, int length) {
if (isDirectMemory()) {
writeSkip(length); // blow up if there isn't that much space left
long destAddress = addressForWrite(writePosition() - length);
UnsafeMemory.copyMemory(address, destAddress, length);
} else {
... | vuln | Safe | Java |
int
download_dir(struct sftp_conn *conn, const char *src, const char *dst,
Attrib *dirattrib, int preserve_flag, int print_flag, int resume_flag,
int fsync_flag)
{
char *src_canon;
int ret;
if ((src_canon = do_realpath(conn, src)) == NULL) {
error("Unable to canonicalize path \"%s\"", src);
return -1;
... | vuln | Vulnerable | C/C++ |
fr_print(netdissect_options *ndo,
register const u_char *p, u_int length)
{
int ret;
uint16_t extracted_ethertype;
u_int dlci;
u_int addr_len;
uint16_t nlpid;
u_int hdr_len;
uint8_t flags[4];
ret = parse_q922_addr(ndo, p, &dlci, &addr_len, flags, length);
if (ret == -1)
goto trunc;
if (ret == 0) {... | vuln | Vulnerable | C/C++ |
def basic_auth_protocol_factory(
realm: str,
credentials: Optional[Union[Credentials, Iterable[Credentials]]] = None,
check_credentials: Optional[Callable[[str, str], Awaitable[bool]]] = None,
create_protocol: Optional[Callable[[Any], BasicAuthWebSocketServerProtocol]] = None,
) -> Callable[[Any], Basic... | vuln | Vulnerable | Python |
void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value)
{
switch (type) {
case GEN_X400:
case GEN_EDIPARTY:
a->d.other = value;
break;
case GEN_OTHERNAME:
a->d.otherName = value;
break;
case GEN_EMAIL:
case GEN_DNS:
case GEN_URI:
a->d.ia... | vuln | Vulnerable | Unknown |
static CharDriverState *qemu_chr_open_mux(const char *id,
ChardevBackend *backend,
ChardevReturn *ret, Error **errp)
{
ChardevMux *mux = backend->u.mux.data;
CharDriverState *chr, *drv;
MuxDriver *d;
ChardevCommon *commo... | vuln | Safe | Unknown |
static int dump_iterate(DumpState *s)
{
RAMBlock *block;
int64_t size;
int ret;
while (1) {
block = s->block;
size = block->length;
if (s->has_filter) {
size -= s->start;
if (s->begin + s->length < block->offset + block->length) {
size -= b... | vuln | Vulnerable | C/C++ |
def chunks(self, chunk_size: int) -> Generator['TranslatorInput', None, None]:
"""
Takes a TranslatorInput (itself) and yields TranslatorInputs for chunks of size chunk_size.
:param chunk_size: The maximum size of a chunk.
:return: A generator of TranslatorInputs, one for each chunk cre... | vuln | Safe | Python |
it "drops the collection" do
database.should_receive(:command).with(drop: :users)
collection.drop
end | vuln | Vulnerable | Ruby |
public static void causeSwirlingAttack(PlayerEntity user, LivingEntity target, float distance, float amount) {
World world = target.getEntityWorld();
float h = target.getHealth();
List<LivingEntity> nearbyEntities = world.getEntitiesByClass(LivingEntity.class,
new Box(target.getB... | vuln | Vulnerable | Java |
htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
int len = 0, l;
int c;
int count = 0;
const xmlChar *base = ctxt->input->base;
/*
* Handler for more complex cases
*/
GROW;
c = CUR_CHAR(l);
if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
(!IS_LETTER(c) && (c != ... | vuln | Safe | C/C++ |
$options['LIMIT'] = $this->parameters->getParameter( 'count' );
}
if ( $this->parameters->getParameter( 'openreferences' ) ) {
if ( count( $this->parameters->getParameter( 'imagecontainer' ) ) > 0 ) {
// $sSqlSelectFrom = $sSqlCl_to.'ic.il_to, '.$sSqlSelPage."ic.il_to AS sortkey".' FROM '.$this->tableNames[... | vuln | Safe | PHP |
isdn_net_addphone(isdn_net_ioctl_phone * phone)
{
isdn_net_dev *p = isdn_net_findif(phone->name);
isdn_net_phone *n;
if (p) {
if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL)))
return -ENOMEM;
strlcpy(n->num, phone->phone, sizeof(n->num));
n->next = p->local->phone[phone->outgoing & 1];
p->local->ph... | vuln | Safe | Unknown |
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* ZGFX (RDP8) Bulk Data Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
* Copyright 2017 Armin Novak <armin.novak@thincast.com>
* Copyright 2017 Thincast Technologies GmbH
*
* Licensed under the Apache License, Version 2.0 (th... | vuln | Safe | C/C++ |
package rpcclient
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/url"
"reflect"
"strings"
"github.com/pkg/errors"
amino "github.com/tendermint/go-amino"
types "github.com/tendermint/tendermint/rpc/lib/types"
)
const (
protoHTTP = "http"
protoHTTPS = "https"
protoWSS = "ws... | vuln | Vulnerable | Go |
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_varint.c -- routines dealing with IETF QUIC varint.
*/
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include "lsquic_byteswap.h"
#include "lsquic_varint.h"
/* Returns number of bytes read from p (1, 2, 4, or 8), or... | vuln | Vulnerable | C/C++ |
int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
{
int ret;
int size;
if (ud->side == USBIP_STUB) {
/* the direction of urb must be OUT. */
if (usb_pipein(urb->pipe))
return 0;
size = urb->transfer_buffer_length;
} else {
/* the direction of urb must be IN. */
if (usb_pipeout(urb->pipe)... | vuln | Vulnerable | Unknown |
private boolean hasVoiceOrVideoMessageContent () {
Args args = getArgumentsStrict();
switch (mode) {
case MODE_TELEGRAM_FILES: {
for (MediaItem item : args.telegramFiles) {
TdApi.InputMessageContent content = item.createShareContent(null);
if (content.getConstructor() == TdApi.... | vuln | Vulnerable | Java |
xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
const char **params, const char *output,
FILE * profile, xsltTransformContextPtr userCtxt)
{
xmlDocPtr res = NULL;
xsltTransformContextPtr ctxt = NULL;
xmlNodePtr root, node;
const... | vuln | Safe | C/C++ |
static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
struct iocb __user *user_iocb, bool compat)
{
struct aio_kiocb *req;
ssize_t ret;
/* enforce forwards compatibility on users */
if (unlikely(iocb->aio_reserved2)) {
pr_debug("EINVAL: reserve field set\n");
return -EINVAL;
}
/* pre... | vuln | Safe | Unknown |
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2007-2009 Patrick McHardy <kaber@trash.net>
*
* Development of this code funded by Astaro AG (http://www.astaro.com/)
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/netlink.h>
#includ... | vuln | Vulnerable | C/C++ |
/* 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... | vuln | Safe | C/C++ |
void cache_fini(PageCache *cache)
{
int64_t i;
g_assert(cache);
g_assert(cache->page_cache);
for (i = 0; i < cache->max_num_items; i++) {
g_free(cache->page_cache[i].it_data);
}
g_free(cache->page_cache);
cache->page_cache = NULL;
} | vuln | Vulnerable | C/C++ |
"""
Defines helper methods useful for setting up ports, launching servers, and handling `ngrok`
"""
import os
import socket
import threading
from flask import Flask, request, session, jsonify, abort, send_file, render_template, redirect
from flask_cachebuster import CacheBuster
from flask_login import LoginManager, lo... | vuln | Safe | Python |
// lessc_helper.js
//
// helper functions for lessc
var lessc_helper = {
//Stylize a string
stylize : function(str, style) {
var styles = {
'reset' : [0, 0],
'bold' : [1, 22],
'inverse' : [7, 27],
'underline' : [4, 24],
'y... | vuln | Safe | Java |
/*
* Copyright (c) 2009-2012, Salvatore Sanfilippo <antirez at gmail dot com>
* 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 co... | vuln | Vulnerable | C/C++ |
public static void printPayloadsInfo(Collection<MetaData> data){
Logger.success("List all payloads!");
AsciiTable at = new AsciiTable();
at.addRule();
at.addRow("Payloads", "Author", "Targets", "Dependencies");
at.addRule();
for(MetaData metaData:data){
if(met... | vuln | Safe | Java |
static int vorbis_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
AVStream *st = s->streams[idx];
struct ogg_stream *os = ogg->streams + idx;
struct oggvorbis_private *priv;
int pkt_type = os->buf[os->pstart];
if (!os->private) {
os->private = av_mallocz(sizeof(... | vuln | Vulnerable | Unknown |
private Graph getGraphObject(String serverName, String userId, String guid, Date asOfTime, String nodeFilterStr, String lineFilterStr, StatusFilter statusFilter, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException {
SubjectAreaGraphClient graphClient = insta... | vuln | Safe | Java |
lldp_decode(struct lldpd *cfg, char *frame, int s,
struct lldpd_hardware *hardware,
struct lldpd_chassis **newchassis, struct lldpd_port **newport)
{
struct lldpd_chassis *chassis;
struct lldpd_port *port;
char lldpaddr[ETHER_ADDR_LEN];
const char dot1[] = LLDP_TLV_ORG_DOT1;
const char dot3[] = LLDP_TLV_OR... | vuln | Safe | C/C++ |
static void json_message_process_token(JSONLexer *lexer, QString *token, JSONTokenType type, int x, int y)
{
JSONMessageParser *parser = container_of(lexer, JSONMessageParser, lexer);
QDict *dict;
if (type == JSON_OPERATOR) {
switch (qstring_get_str(token)[0]) {
case '{':
parser-... | vuln | Safe | C/C++ |
private boolean doWalkInterval(PartitionManager.Interval interval, DbRange tableRange)
throws RocksDBException, StreamSqlException {
DbIterator iterator = null;
RdbPartition p1 = (RdbPartition) interval.iterator().next();
final YRDB rdb;
if (p1.dir != null) {
log... | vuln | Safe | Java |
static int cuse_channel_release(struct inode *inode, struct file *file)
{
struct fuse_dev *fud = file->private_data;
struct cuse_conn *cc = fc_to_cc(fud->fc);
int rc;
/* remove from the conntbl, no more access from this point on */
mutex_lock(&cuse_lock);
list_del_init(&cc->list);
mutex_unlock(&cuse_lock);
/*... | vuln | Vulnerable | Unknown |
_PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
const struct ldap_control_handler *control_handlers,
struct ldap_message *msg)
{
uint8_t tag;
if (!asn1_start_tag(data, ASN1_SEQUENCE(0))) goto prot_err;
if (!asn1_read_Integer(data, &msg->messageid)) goto prot_err;
if (!asn1_peek_uint8(data,... | vuln | Safe | Unknown |
static int vorbis_floor0_decode(vorbis_context *vc,
vorbis_floor_data *vfu, float *vec)
{
vorbis_floor0 *vf = &vfu->t0;
float *lsp = vf->lsp;
uint_fast32_t amplitude;
uint_fast32_t book_idx;
uint_fast8_t blockflag = vc->modes[vc->mode_number].blockflag;
amplitude ... | vuln | Safe | C/C++ |
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
... | vuln | Safe | Java |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import... | vuln | Safe | C/C++ |
void SoftAVC::drainOneOutputBuffer(int32_t picId, uint8_t* data) {
List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);
BufferInfo *outInfo = *outQueue.begin();
outQueue.erase(outQueue.begin());
OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader;
OMX_BUFFERHEADERTYPE *header = mPicToHe... | vuln | Vulnerable | C/C++ |
static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status,
cubemap = MagickFalse,
volume = MagickFalse,
matte;
CompressionType
compression;
DDSInfo
dds_info;
DDSDecoder
*decoder;
size_t
n,
num_images... | vuln | Vulnerable | Unknown |
node_t *create_node(char *filename)
{
node_t *node = malloc(sizeof(node_t));
node->next = NULL;
node->prev = NULL;
node->filename = filename;
stat(filename, &node->st);
node->content = malloc(node->st.st_size);
FILE *fp = fopen(filename, "rb");
fread(node->content, node->st.st_size, 1... | vuln | Vulnerable | C/C++ |
static void RemoveResolutionFromResourceBlock(StringInfo *bim_profile)
{
register const unsigned char
*p;
size_t
length;
unsigned char
*datum;
unsigned int
count,
long_sans;
unsigned short
id,
short_sans;
length=GetStringInfoLength(bim_profile);
if (length < 16)
return... | vuln | Safe | C/C++ |
static int __ext4_get_inode_loc(struct inode *inode,
struct ext4_iloc *iloc, int in_mem)
{
struct ext4_group_desc *gdp;
struct buffer_head *bh;
struct super_block *sb = inode->i_sb;
ext4_fsblk_t block;
int inodes_per_block, inode_offset;
iloc->bh = NULL;
if (inode->i_ino < EXT4_ROOT_INO ||
inode->i_... | vuln | Safe | Unknown |
QPDF::readObjectAtOffset(bool try_recovery,
qpdf_offset_t offset, std::string const& description,
int exp_objid, int exp_generation,
int& objid, int& generation)
{
if (! this->m->attempt_recovery)
{
try_recovery = false;
}
setLastObjectDescription(description, exp_objid, exp_generati... | vuln | Safe | Unknown |
static void do_dcbz(CPUPPCState *env, target_ulong addr, int dcache_line_size,
uintptr_t raddr)
{
int i;
addr &= ~(dcache_line_size - 1);
for (i = 0; i < dcache_line_size; i += 4) {
cpu_stl_data_ra(env, addr + i, 0, raddr);
}
if (env->reserve_addr == addr) {
env->... | vuln | Vulnerable | C/C++ |
compile_get_env(char_u **arg, cctx_T *cctx)
{
char_u *start = *arg;
int len;
int ret;
char_u *name;
++*arg;
len = get_env_len(arg);
if (len == 0)
{
semsg(_(e_syntax_error_at_str), start - 1);
return FAIL;
}
// include the '$' in the name, eval_env_var() expects it.
name... | vuln | Vulnerable | C/C++ |
rsvg_clip_path_parse (const RsvgDefs * defs, const char *str)
{
char *name;
name = rsvg_get_url_string (str);
if (name) {
RsvgNode *val;
val = rsvg_defs_lookup (defs, name);
g_free (name);
if (val && (!strcmp (val->type->str, "clipPath")))
return val;
}
... | vuln | Vulnerable | Unknown |
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx,
ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header)
{
uint8_t rps_predict = 0;
int delta_poc;
int k0 = 0;
int k1 = 0;
int k = 0;
int i;
if (rps != sps->st_rps && sps->nb_st_... | vuln | Safe | C/C++ |
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
{
int ret;
if ((ret = graph_check_validity(graphctx, log_ctx)))
if ((ret = graph_insert_fifos(graphctx, log_ctx)) < 0)
if ((ret = graph_config_formats(graphctx, log_ctx)))
if ((ret = graph_config_links(graphctx, log_ctx)))
if ((re... | vuln | Vulnerable | C/C++ |
static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
FDKAACDecContext *s = avctx->priv_data;
AVFrame *frame = data;
int ret;
AAC_DECODER_ERROR err;
UINT valid = avpkt->size;
err = aacDecoder_Fill(s->handle, &avp... | vuln | Safe | C/C++ |
/*-
* Copyright 2014 Square Inc.
*
* 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... | vuln | Vulnerable | Go |
private void parseOnce(String powerString) {
CustomBossReinforcement customBossReinforcement = new CustomBossReinforcement();
customBossReinforcement.summonType = SummonType.ONCE;
String[] strings = powerString.split(":");
customBossReinforcement.bossFileName = strings[2];
if (Cu... | vuln | Safe | Java |
int xml_init(modsec_rec *msr, char **error_msg) {
xmlParserInputBufferCreateFilenameFunc entity;
if (error_msg == NULL) return -1;
*error_msg = NULL;
msr->xml = apr_pcalloc(msr->mp, sizeof(xml_data));
if (msr->xml == NULL) return -1;
if(msr->txcfg->xml_external_entity == 0) {
entit... | vuln | Safe | C/C++ |
static int append_to_cached_buf(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVDSubContext *ctx = avctx->priv_data;
if (ctx->buf_size > 0xffff - buf_size) {
av_log(avctx, AV_LOG_WARNING, "Attempt to reconstruct "
"too large SPU packets aborted... | vuln | Vulnerable | C/C++ |
struct clock_source *dcn20_clock_source_create(
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
kzalloc(sizeof(struct dce110_clk_src), GFP_KERNEL);
if (!clk_src)
return NULL;
if (dcn20_clk_sr... | vuln | Vulnerable | 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 template
import (
"bytes"
"fmt"
"strings"
"unicode/utf8"
)
// htmlNospaceEscaper escapes for inclusion in unquoted attribute values.
func htmlNosp... | vuln | Safe | Go |
static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
struct CERTDistNamesStr *caNames,
struct CERTCertificateStr **pRetCert,
struct SECKEYPrivateKeyStr **pRetKey)
{
struct ssl_connect_data *connssl = (stru... | vuln | Safe | C/C++ |
static void complete_collecting_data(Flash *s)
{
int i;
s->cur_addr = 0;
for (i = 0; i < get_addr_length(s); ++i) {
s->cur_addr <<= 8;
s->cur_addr |= s->data[i];
}
if (get_addr_length(s) == 3) {
s->cur_addr += s->ear * MAX_3BYTES_SIZE;
}
s->state = STATE_IDLE;
swi... | vuln | Vulnerable | C/C++ |
(function()
{
Sidebar.prototype.addFluidPowerPalette = function()
{
var w = 2;
var h = 2;
var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;aspect=fixed;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;fillColor=strokeColor;align=center;outlineConnect=0;shape=mxgraph.fluid_power.';
var gn = 'mxg... | vuln | Safe | Java |
static int rawsock_create(struct net *net, struct socket *sock,
const struct nfc_protocol *nfc_proto, int kern)
{
struct sock *sk;
pr_debug("sock=%p\n", sock);
if ((sock->type != SOCK_SEQPACKET) && (sock->type != SOCK_RAW))
return -ESOCKTNOSUPPORT;
if (sock->type == SOCK_RAW)
sock->ops = &rawsock_raw_op... | vuln | Vulnerable | C/C++ |
TfLiteStatus EvalHybridPerChannel(TfLiteContext* context, TfLiteNode* node,
TfLiteConvParams* params, OpData* data,
const TfLiteTensor* input,
const TfLiteTensor* filter,
const TfLiteT... | vuln | Safe | Unknown |
void vp8_decode_mvs(VP8Context *s, VP8mvbounds *mv_bounds, VP8Macroblock *mb,
int mb_x, int mb_y, int layout)
{
VP8Macroblock *mb_edge[3] = { 0 ,
mb - 1 ,
0 };
enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR, CNT_SPLITMV }... | vuln | Safe | C/C++ |
void vm_stop(int reason)
{
if (!qemu_thread_is_self(&io_thread)) {
qemu_system_vmstop_request(reason);
cpu_stop_current();
return;
}
do_vm_stop(reason);
} | vuln | Safe | C/C++ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.