code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
ld86r(argc, argv)
int argc; char ** argv;
#endif
{
char buf[128];
FILE * fd, * ifd;
struct stat st;
int ar, libarg=0, need_o = 0, got_o = 0;
for(ar=1; ar<argc; ar++) if( argv[ar][0] == '-' )
{
if( argv[ar][1] == 'r' ) need_o = 1;
if( argv[ar][1] == 'o' ) { got_o++; libarg = 0; }
}
e... | vuln | Safe | C/C++ |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | vuln | Vulnerable | Java |
def _handle_incoming_transaction(self, transaction, request_time):
""" Process an incoming transaction and return the HTTP response
Args:
transaction (Transaction): incoming transaction
request_time (int): timestamp that the HTTP request arrived at
Returns:
... | vuln | Vulnerable | Python |
static int unzzip_cat (int argc, char ** argv, int extract)
{
int done;
int argn;
ZZIP_MEM_DISK* disk;
if (argc == 1)
{
printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n");
return EXIT_OK; /* better provide an archive argument */
}
disk = zzip_mem_disk_open (argv[1]);
if (! d... | vuln | Vulnerable | Unknown |
static void
_blackbox_vlogger(int32_t target,
struct qb_log_callsite *cs, struct timespec *timestamp, va_list ap)
{
size_t max_size;
size_t actual_size;
uint32_t fn_size;
char *chunk;
char *msg_len_pt;
uint32_t msg_len;
struct qb_log_target *t = qb_log_target_get(target);
if (t->instance == NULL) {
retur... | vuln | Vulnerable | C/C++ |
// SPDX-License-Identifier: GPL-2.0-only
#include <crypto/hash.h>
#include <linux/export.h>
#include <linux/bvec.h>
#include <linux/fault-inject-usercopy.h>
#include <linux/uio.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/splice.h>
#include ... | vuln | Vulnerable | C/C++ |
async def _static_request_handler(
self,
file_or_directory,
use_modified_since,
use_content_range,
stream_large_files,
request,
content_type=None,
__file_uri__=None,
):
# Merge served directory and requested file if provided
root_path =... | vuln | Safe | Python |
static void validate_under_overlay(QPDF& pdf, UnderOverlay* uo, Options& o)
{
if (0 == uo->filename)
{
return;
}
QPDFPageDocumentHelper main_pdh(pdf);
int main_npages = QIntC::to_int(main_pdh.getAllPages().size());
uo->pdf = process_file(uo->filename, uo->password, o);
QPDFPageDocume... | vuln | Safe | Unknown |
void BrowserWindowGtk::UpdateDevToolsForContents(WebContents* contents) {
TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::UpdateDevToolsForContents");
DevToolsWindow* new_devtools_window = contents ?
DevToolsWindow::GetDockedInstanceForInspectedTab(contents) : NULL;
if (devtools_window_ == new_devtools_window &... | vuln | Vulnerable | C/C++ |
public boolean isHeightmapAllowed() {
return app.useOpenGlRenderer() && isHeightmapPurchased();
} | vuln | Safe | Java |
public synchronized void initialize(World world) {
if (!(world instanceof FakeWorld) && fake.get() && this.compound != null) {
fake.set(false);
this.compound.updateWorld(world);
getTarget().updateWorld(world);
placeStrongholds(world);
for (int i = 0; ... | vuln | Vulnerable | Java |
document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(t);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(E){mxEvent.getSource(E)!=t&&(t.checked=!t.checked)});header=z}var L=localStorage... | vuln | Safe | JavaScript |
def _handle_changed_object(sender, instance, raw=False, **kwargs):
"""
Fires when an object is created or updated.
"""
if raw:
return
if change_context_state.get() is None:
return
# Determine the type of change being made
if kwargs.get("created"):
action = ObjectCh... | vuln | Safe | Python |
static void
untrusted_launcher_response_callback (GtkDialog *dialog,
int response_id,
ActivateParametersDesktop *parameters)
{
GdkScreen *screen;
char *uri;
GFile *file;
switch (response_i... | vuln | Vulnerable | C/C++ |
function escapeShellArgWithInterpolation(arg, shell) {
let result = arg
.replace(/\u{0}/gu, "")
.replace(/\\/g, "\\\\")
.replace(/^(~|#)/g, "\\$1")
.replace(/(\*|\?)/gu, "\\$1")
.replace(/(\$|\;|\&|\|)/g, "\\$1")
.replace(/(\(|\)|\<|\>)/g, "\\$1")
.replace(/("|'|`)/g, "\\$1");
if (shell... | vuln | Safe | JavaScript |
private void summonReinforcement(EliteEntity eliteEntity, CustomBossReinforcement customBossReinforcement) {
if (customBossReinforcement.summonChance != null && ThreadLocalRandom.current().nextDouble() > customBossReinforcement.summonChance)
return;
for (int i = 0; i < customBossReinforcemen... | vuln | Vulnerable | Java |
PPC_OP(mulhwu)
{
T0 = ((uint64_t)T0 * (uint64_t)T1) >> 32;
RETURN();
} | vuln | Vulnerable | C/C++ |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const auto& input_min_tensor = context->input(1);
OP_REQUIRES(context, input_min_tensor.NumElements() == 1,
errors::InvalidArgument("input_min must have 1 element"));
const float input_min = input_... | vuln | Safe | C/C++ |
newSession(userInfo, context, sessionType, sessionParams) {
if (sessionType !== ApiSession.typeId) {
throw new Error("SessionType must be ApiSession.");
}
const options = {};
if (this.token) {
options.headers = {
authorization: "Bearer " + this.token,
};
}
return inM... | vuln | Safe | JavaScript |
static int x8_decode_intra_mb(IntraX8Context* const w, const int chroma){
MpegEncContext * const s= w->s;
uint8_t * scantable;
int final,run,level;
int ac_mode,dc_mode,est_run,dc_level;
int pos,n;
int zeros_only;
int use_quant_matrix;
int sign;
assert(w->orient<12);
s->dsp.clear_... | vuln | Safe | C/C++ |
function peg$parsecomment() {
var s0, s1, s2, s3, s4, s5;
peg$silentFails++;
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c101) {
s1 = peg$c101;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c102); }
... | vuln | Safe | JavaScript |
// Copyright 2012 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 net
import (
"context"
"internal/nettrace"
"internal/singleflight"
"sync"
)
// protocols contains minimal mappings between internet protocol
// na... | vuln | Safe | Go |
void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque)
{
SaveStateEntry *se, *new_se;
char id[256] = "";
if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) {
char *path = dev->parent_bus->info->get_dev_path(dev);
if (path) {
pstrcpy(id, sizeof(i... | vuln | Vulnerable | C/C++ |
BOOL freerdp_bitmap_planar_context_reset(BITMAP_PLANAR_CONTEXT* context, UINT32 width,
UINT32 height)
{
if (!context)
return FALSE;
context->bgr = FALSE;
context->maxWidth = PLANAR_ALIGN(width, 4);
context->maxHeight = PLANAR_ALIGN(height, 4);
const UINT64 tmp = (UINT64)... | vuln | Safe | C/C++ |
static void qmp_input_get_next_type(Visitor *v, int *kind, const int *qobjects,
const char *name, Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, false);
if (!qobj) {
error_setg(errp, QERR_MISSING_PARAMETER, name ?... | vuln | Vulnerable | C/C++ |
static void ioreq_release(struct ioreq *ioreq, bool finish)
{
struct XenBlkDev *blkdev = ioreq->blkdev;
QLIST_REMOVE(ioreq, list);
memset(ioreq, 0, sizeof(*ioreq));
ioreq->blkdev = blkdev;
QLIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
if (finish) {
blkdev->requests_finished--;
}... | vuln | Vulnerable | C/C++ |
static int aac_get_hba_info(struct aac_dev *dev, void __user *arg)
{
struct aac_hba_info hbainfo;
memset(&hbainfo, 0, sizeof(hbainfo));
hbainfo.adapter_number = (u8) dev->id;
hbainfo.system_io_bus_number = dev->pdev->bus->number;
hbainfo.device_number = (dev->pdev->devfn >> 3);
hbainfo.function_number = (dev-... | vuln | Safe | 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 ... | vuln | Vulnerable | Python |
static ssize_t _hostsock_recvfrom(
oe_fd_t* sock_,
void* buf,
size_t count,
int flags,
const struct oe_sockaddr* src_addr,
oe_socklen_t* addrlen)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_socklen_t addrlen_in = 0;
oe_errno = 0;
if (!sock || (count && !buf))
... | vuln | Vulnerable | Unknown |
void gf_isom_cenc_get_default_info_internal(GF_TrackBox *trak, u32 sampleDescriptionIndex, u32 *container_type, Bool *default_IsEncrypted, u8 *crypt_byte_block, u8 *skip_byte_block, const u8 **key_info, u32 *key_info_size)
{
GF_ProtectionSchemeInfoBox *sinf;
//setup all default as not encrypted
if (default_IsEncry... | vuln | Vulnerable | C/C++ |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Safe | C/C++ |
Chapters::Edition::Edition()
{
} | vuln | Vulnerable | C/C++ |
/* Copyright 2022 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 | Vulnerable | Python |
def editShow(self, show=None, location=None, anyQualities=None, bestQualities=None,
exceptions_list=None, season_folders=None, paused=None, directCall=False,
air_by_date=None, sports=None, dvdorder=None, indexerLang=None,
subtitles=None, subtitles_sr_metadata=None, rls... | vuln | Vulnerable | Python |
void *umm_calloc( size_t num, size_t item_size ) {
void *ret;
size_t size = item_size * num;
/* check poison of each blocks, if poisoning is enabled */
if (!CHECK_POISON_ALL_BLOCKS()) {
return NULL;
}
/* check full integrity of the heap, if this check is enabled */
if (!INTEGRITY_CHECK()) {
retu... | vuln | Safe | Unknown |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#define DEBUG_TYPE "codeblock"
#include "hermes/VM/CodeBlock.h"
#include "hermes/BCGen/HBC/Bytecode.h"
#include "hermes/BCGen/H... | vuln | Safe | C/C++ |
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_writer.c -- write frames to HEADERS stream.
*
* The frame is first written to list of frame_buf's (frabs) and then
* out to the stream. This is done because frame's size is written out
* to the stream and we may not have e... | vuln | Vulnerable | C/C++ |
import { AnalyticsAdapter } from '../Adapters/Analytics/AnalyticsAdapter';
import { FilesAdapter } from '../Adapters/Files/FilesAdapter';
import { LoggerAdapter } from '../Adapters/Logger/LoggerAdapter';
import { StorageAdapter } from '../Adapters/Storage/StorageAdapter';
import { CacheAdapter } from '../Adapters/Cache... | vuln | Safe | JavaScript |
bool bt_att_cancel(struct bt_att *att, unsigned int id)
{
const struct queue_entry *entry;
struct att_send_op *op;
if (!att || !id)
return false;
/* Lookuo request on each channel first */
for (entry = queue_get_entries(att->chans); entry;
entry = entry->next) {
struct bt_att_chan *chan = entry->data;
... | vuln | Vulnerable | Unknown |
/*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
*
* 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, including without limitation the rights
* to use, copy,... | vuln | Safe | Java |
static bool anal_fcn_data (RCore *core, const char *input) {
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, core->offset, -1);
ut32 fcn_size = r_anal_function_size_from_entry (fcn);
if (fcn) {
int i;
bool gap = false;
ut64 gap_addr = UT64_MAX;
char *bitmap = calloc (1, fcn_size);
if (bitmap) {
RAna... | vuln | Vulnerable | C/C++ |
@Override
public void revert() {
txn.revert();
mutableCache = null;
mutatedInTxn = new ArrayList<>();
} | vuln | Vulnerable | Java |
/* 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... | vuln | Safe | C/C++ |
static void
l2tp_accm_print(netdissect_options *ndo, const u_char *dat, u_int length)
{
const uint16_t *ptr = (const uint16_t *)dat;
uint16_t val_h, val_l;
if (length < 2) {
ND_PRINT((ndo, "AVP too short"));
return;
}
ptr++; /* skip "Reserved" */
length -= 2;
if (length < 4) {
ND_PRINT((ndo, "AVP too sh... | vuln | Safe | C/C++ |
TfLiteStatus EvalHybridPerChannel(TfLiteContext* context, TfLiteNode* node,
TfLiteConvParams* params, OpData* data,
const TfLiteTensor* input,
const TfLiteTensor* filter,
const TfLiteT... | vuln | Vulnerable | C/C++ |
public ResetPasswordRequestResponse requestResetPassword(UserReference userReference) throws ResetPasswordException
{
this.checkUserReference(userReference);
UserProperties userProperties = this.userPropertiesResolver.resolve(userReference);
InternetAddress email = userProperties.getEmail()... | vuln | Vulnerable | Java |
QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head,
const GraphicHwOps *hw_ops,
void *opaque)
{
Error *local_err = NULL;
int width = 640;
int height = 480;
QemuConsole *s;
DisplayState *ds;
ds = get_alloc_displays... | vuln | Vulnerable | C/C++ |
static int tee_write_trailer(AVFormatContext *avf)
{
TeeContext *tee = avf->priv_data;
int ret_all = 0, ret;
unsigned i;
for (i = 0; i < tee->nb_slaves; i++) {
if ((ret = close_slave(&tee->slaves[i])) < 0)
if (!ret_all)
ret_all = ret;
}
return ret_all;
} | vuln | Safe | C/C++ |
static int dump_ppc_insns (CPUPPCState *env)
{
opc_handler_t **table, *handler;
uint8_t opc1, opc2, opc3;
printf("Instructions set:\n");
for (opc1 = 0x00; opc1 < 0x40; opc1++) {
table = env->opcodes;
handler = table[opc1];
if (is_indirect_opcode(handler)) {
... | vuln | Vulnerable | C/C++ |
void bn_grow(bn_t a, int digits) {
#if ALLOC == DYNAMIC
dig_t *t;
if (a->alloc < digits) {
/* At least add RLC_BN_SIZE more digits. */
digits += (RLC_BN_SIZE * 2) - (digits % RLC_BN_SIZE);
t = (dig_t *)realloc(a->dp, (RLC_DIG / 8) * digits);
if (t == NULL) {
RLC_THROW(ERR_NO_MEMORY);
return;
}
a->d... | vuln | Vulnerable | C/C++ |
def checkin(pickledata):
config = pickle.loads(bz2.decompress(base64.urlsafe_b64decode(pickledata)))
r, message = read_host_config(SESSION, config)
if r is not None:
return message + 'checked in successful'
else:
return message + 'error checking in' | vuln | Vulnerable | Python |
public static boolean isFaultNeedToInject(int percentage) {
return ThreadLocalRandom.current().nextInt(100) <= percentage;
} | vuln | Vulnerable | Java |
private void processSpecialTags(JsonParser jsonParser) throws IOException {
LOG.info("@odata tags found - start parsing");
String key = jsonParser.getCurrentName();
jsonParser.nextToken();
String value = jsonParser.getText();
odataValues.put(key, value);
} | vuln | Vulnerable | Java |
@staticmethod
def _create_database(engine: "Engine", db: Text):
"""Create database `db` on `engine` if it does not exist."""
import psycopg2
conn = engine.connect()
cursor = conn.connection.cursor()
cursor.execute("COMMIT")
cursor.execute(f"SELECT 1 FROM pg_catalog... | vuln | Vulnerable | Python |
static av_cold int decimate_init(AVFilterContext *ctx)
{
DecimateContext *dm = ctx->priv;
AVFilterPad pad = {
.name = av_strdup("main"),
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
.config_props = config_input,
};
if (!pad.name)
retur... | vuln | Vulnerable | C/C++ |
static void usbredir_buffered_bulk_packet(void *priv, uint64_t id,
struct usb_redir_buffered_bulk_packet_header *buffered_bulk_packet,
uint8_t *data, int data_len)
{
USBRedirDevice *dev = priv;
uint8_t status, ep = buffered_bulk_packet->endpoint;
void *free_on_destroy;
int i, len;
DPRINTF("b... | vuln | Vulnerable | C/C++ |
/*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
*
* 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, including without limitation the rights
* to use, copy,... | vuln | Vulnerable | Java |
def _dynarray_make_setter(dst, src):
assert isinstance(src.typ, DArrayType)
assert isinstance(dst.typ, DArrayType)
if src.value == "~empty":
return IRnode.from_list(STORE(dst, 0))
if src.value == "multi":
ret = ["seq"]
# handle literals
# write the length word
... | vuln | Vulnerable | Python |
GLboolean WebGLRenderingContextBase::isProgram(WebGLProgram* program) {
if (!program || isContextLost())
return 0;
return ContextGL()->IsProgram(program->Object());
} | vuln | Vulnerable | C/C++ |
void loadModel(HOTableModel model) {
int count = 0;
var userColumns = load(_UserColumn.class, model.getId() * 1000, model.getId() * 1000 + 999);
UserColumn[] dbcolumns = model.getColumns();
for (var userColumn : userColumns) {
var modelIndex = userColumn.getModelIndex();
if (modelIndex < dbcolumns.length)... | vuln | Vulnerable | Java |
static int oma_read_seek(struct AVFormatContext *s,
int stream_index, int64_t timestamp, int flags)
{
OMAContext *oc = s->priv_data;
int err = ff_pcm_read_seek(s, stream_index, timestamp, flags);
if (!oc->encrypted)
return err;
if (err || avio_tell(s->pb) < oc->cont... | vuln | Vulnerable | C/C++ |
/*
* ECDSA implemenation
* (C) 2007 Manuel Hartl, FlexSecure GmbH
* 2007 Falko Strenzke, FlexSecure GmbH
* 2008-2010,2015,2016,2018 Jack Lloyd
* 2016 René Korthaus
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/ecdsa.h>
#include <botan/internal/pk_ops_impl.h>
#i... | vuln | Vulnerable | C/C++ |
function test_empty_comment() {
$result = $this->myxmlrpcserver->wp_newComment(
array(
1,
'administrator',
'administrator',
self::$posts['publish']->ID,
array(
'content' => '',
),
)
);
$this->assertIXRError( $result );
$this->assertSame( 403, $result->code );
} | vuln | Safe | PHP |
def testSABnzbd(host=None, username=None, password=None, apikey=None):
# self.set_header(b'Cache-Control', 'max-age=0,no-cache,no-store')
host = config.clean_url(host)
connection, accesMsg = sab.getSabAccesMethod(host)
if connection:
authed, authMsg = sab.testAuthentication... | vuln | Vulnerable | Python |
// Copyright 2009,2010 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.
// NetBSD system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates s... | vuln | Vulnerable | Go |
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined... | vuln | Vulnerable | JavaScript |
/**
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
*
* The Apereo Foundation licenses this file to you under the Educational
* Community License, Version 2.0 (the ... | vuln | Vulnerable | Java |
static av_cold int tta_decode_init(AVCodecContext * avctx)
{
TTAContext *s = avctx->priv_data;
int i;
s->avctx = avctx;
if (avctx->extradata_size < 30)
return -1;
init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8);
if (show_bits_long(&s->gb, 32) == AV_RL32("TTA1"))
... | vuln | Vulnerable | C/C++ |
static int load_sofa(AVFilterContext *ctx, char *filename, int *samplingrate)
{
struct SOFAlizerContext *s = ctx->priv;
int ncid, n_dims, n_vars, n_gatts, n_unlim_dim_id, status;
char data_delay_dim_name[NC_MAX_NAME];
float *sp_a, *sp_e, *sp_r, *data_ir;
char *sofa_conventions;
char dim_nam... | vuln | Vulnerable | C/C++ |
async renderMermaid () {
const codes = this.exportContainer.querySelectorAll('code.language-mermaid')
for (const code of codes) {
const preEle = code.parentNode
const mermaidContainer = document.createElement('div')
mermaidContainer.innerHTML = code.innerHTML
mermaidContainer.classList.a... | vuln | Vulnerable | JavaScript |
package unzip
import (
"archive/zip"
"errors"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"runtime"
"time"
"strings"
"fmt"
)
var (
netClient = &http.Client{
Timeout: time.Duration(3600 * time.Second),
}
)
// Unzip - struct
type Unzip struct {
Src string
Dest string
}
// New... | vuln | Safe | Go |
static int decode_hq_slice(DiracContext *s, DiracSlice *slice, uint8_t *tmp_buf)
{
int i, level, orientation, quant_idx;
int qfactor[MAX_DWT_LEVELS][4], qoffset[MAX_DWT_LEVELS][4];
GetBitContext *gb = &slice->gb;
SliceCoeffs coeffs_num[MAX_DWT_LEVELS];
skip_bits_long(gb, 8*s->highquality.prefix_byte... | vuln | Safe | C/C++ |
static int decode_555(GetByteContext *gB, uint16_t *dst, int stride,
int keyframe, int w, int h)
{
int last_symbol = 0, repeat = 0, prev_avail = 0;
if (!keyframe) {
int x, y, endx, endy, t;
#define READ_PAIR(a, b) \
a = bytestream2_get_byte(gB) << 4; \
t =... | vuln | Vulnerable | C/C++ |
static struct sk_buff **gre_gro_receive(struct sk_buff **head,
struct sk_buff *skb)
{
struct sk_buff **pp = NULL;
struct sk_buff *p;
const struct gre_base_hdr *greh;
unsigned int hlen, grehlen;
unsigned int off;
int flush = 1;
struct packet_offload *ptype;
__be16 type;
off = skb_gro_offset(skb);
hl... | vuln | Vulnerable | C/C++ |
constructor(connection, {root, cwd} = {}) {
this.connection = connection;
this.cwd = nodePath.normalize(cwd ? nodePath.join(nodePath.sep, cwd) : nodePath.sep);
this._root = nodePath.resolve(root || process.cwd());
} | vuln | Vulnerable | JavaScript |
httpLocalRequest(ObjectPtr object, int method, int from, int to,
HTTPRequestPtr requestor, void *closure)
{
if(object->requestor == NULL)
object->requestor = requestor;
if(!disableLocalInterface && urlIsSpecial(object->key, object->key_size))
return httpSpecialRequest(object, m... | vuln | Vulnerable | Unknown |
static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
}
if (bs->io_limits_en... | vuln | Vulnerable | C/C++ |
/*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
*
* 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, including without limitation the rights
* to use, copy,... | vuln | Safe | Java |
static void cmdloop(void)
{
int c, r = 0, mode;
static struct buf cmd, arg1, arg2, arg3, arg4;
char *p, *result, buf[1024];
const char *err;
uint32_t uid, last;
struct backend *be;
char curgroup[MAX_MAILBOX_BUFFER] = "";
allowanonymous = config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN);
... | vuln | Safe | Unknown |
njs_generate_try_end(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_index_t exit_index;
const njs_str_t *dest_label;
njs_vmcode_finally_t *finally;
njs_generator_patch_t *patch;
njs_generator_block_t *blo... | vuln | Safe | C/C++ |
static int __init big_key_init(void)
{ | vuln | Safe | C/C++ |
@Override
public IngestDocument execute(IngestDocument ingestDocument) throws Exception {
throw new UnsupportedOperationException("this method should not get executed");
} | vuln | Vulnerable | Java |
int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
u8 *cmd_buf, u32 cmd_len,
u8 *rsp_buf, u32 rsp_len,
u32 timeout)
{
struct ath_hw *ah = wmi->drv_priv->ah;
struct ath_common *common = ath9k_hw_common(ah);
u16 headroom = sizeof(struct htc_frame_hdr) +
sizeof(struct wmi_cmd_hdr);
struct ... | vuln | Safe | C/C++ |
t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* charstring_base,
FT_UInt charstring_len )
{
FT_Error error;
T1_Decoder_Zone zone;
FT_Byte* ip;
FT_Byte* limit;
T1_Builder builder = &dec... | vuln | Vulnerable | Unknown |
@Override
public @NotNull List<Component> generate(@NotNull Player sender, @NotNull Shop shop) {
QuickShop plugin = QuickShop.getInstance();
List<Component> components = new ArrayList<>();
// Owner
if (!QuickShop.getPermissionManager().hasPermission(sender, "quickshop.setowner")) {
... | vuln | Vulnerable | Java |
public void connect() throws RequestException {
MinecraftProtocol protocol;
if (this.isPremium()) {
MsCodeRequest request = new MsCodeRequest(CLIENT_ID);
MsaAuthenticationService.MsCodeResponse response = HTTP.makeRequestForm(this.getProxy(), MS_CODE_ENDPOINT, request.toMap(), Ms... | vuln | Vulnerable | Java |
int qcrypto_cipher_encrypt(QCryptoCipher *cipher,
const void *in,
void *out,
size_t len,
Error **errp)
{
QCryptoCipherNettle *ctx = cipher->opaque;
if (len % ctx->blocksize) {
error_setg(errp, "Le... | vuln | Safe | C/C++ |
function preloadThumb(file, cb) {
var img = new o.image.Image();
var resolveUrl = o.core.utils.Url.resolveUrl;
img.onload = function() {
var thumb = $('#' + file.id + ' .plupload_file_thumb', self.filelist);
this.embed(thumb[0], {
width: self.options.thumb_width,
height: self.options.thumb_h... | vuln | Vulnerable | JavaScript |
private static String getVulnerabilityExcel(List<Vulnerability> vulnerabilityList) throws Exception{
Workbook wb = null;
Sheet sheet = null;
FileInputStream inFile=null;
try {
inFile= new FileInputStream(new File(downloadpath+"/VulnerabilityReport.xlsx"));
try {wb = new XSSFWorkbook(inFile);} catch (IO... | vuln | Vulnerable | Java |
TPMI_SH_POLICY_Unmarshal(TPMI_SH_POLICY *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_SH_POLICY orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_HANDLE_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
BOOL isNotPolicySessio... | vuln | Safe | Unknown |
static int sap_write_close(AVFormatContext *s)
{
struct SAPState *sap = s->priv_data;
int i;
for (i = 0; i < s->nb_streams; i++) {
AVFormatContext *rtpctx = s->streams[i]->priv_data;
if (!rtpctx)
continue;
av_write_trailer(rtpctx);
url_fclose(rtpctx->pb);
... | vuln | Vulnerable | C/C++ |
void PrintPreviewUI::OnDidPreviewPage(int page_number,
int preview_request_id) {
DCHECK_GE(page_number, 0);
base::FundamentalValue number(page_number);
base::FundamentalValue ui_identifier(id_);
base::FundamentalValue request_id(preview_request_id);
web_ui()->CallJav... | vuln | Safe | C/C++ |
function suggestPassword(passwd_form)
{
// restrict the password to just letters and numbers to avoid problems:
// "editors and viewers regard the password as multiple words and
// things like double click no longer work"
var pwchars = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ";
... | vuln | Safe | JavaScript |
# -*- 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... | vuln | Vulnerable | Python |
static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64 tally)
{
uint32 good_cksum, cksum = 0;
i64 len, ofs, total = 0;
int l = -1, p = 0;
char chunk_bytes;
struct stat st;
uchar head;
void *ss;
bool err = false;
/* for display of progress */
unsigned long divisor[] = {1,1024,1048576... | vuln | Safe | Unknown |
@Override
public void update() {
if (!world.isRemote && getWorld().getTotalWorldTime() % 10 == 0)
checkCanInfestOrHarvest(getWorld());
if(world.isRemote && switchTextureCount > 0)
switchTextureCount--;
} | vuln | Safe | Java |
int kvm_iommu_unmap_guest(struct kvm *kvm)
{
struct iommu_domain *domain = kvm->arch.iommu_domain;
/* check if iommu exists and in use */
if (!domain)
return 0;
mutex_lock(&kvm->slots_lock);
kvm_iommu_unmap_memslots(kvm);
kvm->arch.iommu_domain = NULL;
mutex_unlock(&kvm->slots_lock);
iommu_domain_free(doma... | vuln | Safe | Unknown |
@Override
protected void configure(HttpSecurity aHttp) throws Exception
{
// @formatter:off
aHttp
.antMatcher("/api/**")
.csrf().disable()
// We hard-wire the internal user DB as the authentication provider here because
... | vuln | Vulnerable | Java |
!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_C... | vuln | Vulnerable | JavaScript |
CopyFrom(CopyState cstate)
{
HeapTuple tuple;
TupleDesc tupDesc;
Datum *values;
bool *nulls;
ResultRelInfo *resultRelInfo;
EState *estate = CreateExecutorState(); /* for ExecConstraints() */
ExprContext *econtext;
TupleTableSlot *myslot;
MemoryContext oldcontext = CurrentMemoryContext;
ErrorContextC... | vuln | Vulnerable | Unknown |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.