code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
parse_key_usage (PKT_signature * sig)
{
int key_usage = 0;
const byte *p;
size_t n;
byte flags;
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_FLAGS, &n);
if (p && n)
{
/* First octet of the keyflags. */
flags = *p;
if (flags & 1)
{
key_usage |= PUBKEY_USAGE_CERT;
flags &= ... | vuln | Safe | Unknown |
/* Copyright (C) 2001-2019 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... | vuln | Safe | C/C++ |
static enum fetch_step
vbf_stp_error(struct worker *wrk, struct busyobj *bo)
{
ssize_t l, ll, o;
double now;
uint8_t *ptr;
struct vsb *synth_body;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_NOTNULL(bo->fetch_objcore, OBJCORE_MAGIC);
AN(bo->fetch_objcore->flags & OC_F_... | vuln | Vulnerable | C/C++ |
void hashtable_clear(hashtable_t *hashtable)
{
size_t i;
hashtable_do_clear(hashtable);
for(i = 0; i < hashsize(hashtable->order); i++)
{
hashtable->buckets[i].first = hashtable->buckets[i].last =
&hashtable->list;
}
list_init(&hashtable->list);
hashtable->size = 0;
} | vuln | Safe | C/C++ |
static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
LibOpenJPEGContext *ctx = avctx->priv_data;
opj_cinfo_t *compress = ctx->compress;
opj_image_t *image = ctx->image;
opj_cio_t *stream = ctx->strea... | vuln | Safe | C/C++ |
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2002-2014 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
* OpenNMS(... | vuln | Safe | Java |
ft_smooth_render_generic( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin,
FT_Render_Mode required_mode )
{
FT_Error error;
FT_Outline* out... | vuln | Vulnerable | Unknown |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Safe | C/C++ |
public static void rename(@NonNull Path pathToRename, @NonNull String newName)
throws IOException {
Assert.notNull(pathToRename, "File path to rename must not be null");
Assert.notNull(newName, "New name must not be null");
Path newPath = pathToRename.resolveSibling(newName);
va... | vuln | Safe | Java |
FT_Bitmap_Embolden( FT_Library library,
FT_Bitmap* bitmap,
FT_Pos xStrength,
FT_Pos yStrength )
{
FT_Error error;
unsigned char* p;
FT_Int i, x, y, pitch;
FT_Int xstr, ystr;
return FT_... | vuln | Vulnerable | C/C++ |
exports.extract = function (cwd, opts) {
if (!cwd) cwd = '.'
if (!opts) opts = {}
var xfs = opts.fs || fs
var ignore = opts.ignore || opts.filter || noop
var map = opts.map || noop
var mapStream = opts.mapStream || echo
var own = opts.chown !== false && !win32 && processGetuid() === 0
var extract = opt... | vuln | Safe | JavaScript |
// Copyright 2015 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.
// +build gccgo
// +build !aix
#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#define _STRINGIFY2_(x) #x
#define _STRINGIFY_(x) _STRINGIFY2_(x)
#d... | vuln | Vulnerable | Go |
static void Ins_MIRP( INS_ARG )
{
Int point,
cvtEntry;
TT_F26Dot6 cvt_dist,
distance,
cur_dist,
org_dist;
point = (Int)args[0];
cvtEntry = (Int)args[1];
/* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
if ( BOUNDS( arg... | vuln | Vulnerable | Unknown |
parse_netscreen_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer* buf,
char *line, int *err, gchar **err_info)
{
int sec;
int dsec;
char cap_int[NETSCREEN_MAX_INT_NAME_LENGTH];
char direction[2];
guint pkt_len;
char cap_src[13];
char cap_dst[13];
guint8 *pd;
gchar *p;
int n, i = 0;
... | vuln | Vulnerable | C/C++ |
static int set_string_binary(void *obj, const AVOption *o, const char *val, uint8_t **dst)
{
int *lendst = (int *)(dst + 1);
uint8_t *bin, *ptr;
int len;
av_freep(dst);
*lendst = 0;
if (!val || !(len = strlen(val)))
return 0;
if (len & 1)
return AVERROR(EINVAL);
len /= 2;... | vuln | Safe | C/C++ |
SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
{
struct shmid_kernel *shp;
int err, version;
struct ipc_namespace *ns;
if (cmd < 0 || shmid < 0)
return -EINVAL;
version = ipc_parse_version(&cmd);
ns = current->nsproxy->ipc_ns;
switch (cmd) {
case IPC_INFO:
case SHM_INFO:
cas... | vuln | Vulnerable | C/C++ |
static int _lldp_send(struct lldpd *global,
struct lldpd_hardware *hardware,
u_int8_t c_id_subtype,
char *c_id,
int c_id_len,
u_int8_t p_id_subtype,
char *p_id,
int p_id_len,
int shutdown)
{
struct lldpd_port *port;
struct lldpd_chassis *chassis;
struct lldpd_frame *frame;
int length... | vuln | Vulnerable | Unknown |
static void vda_decoder_callback(void *vda_hw_ctx,
CFDictionaryRef user_info,
OSStatus status,
uint32_t infoFlags,
CVImageBufferRef image_buffer)
{
struct vda_context *vda_ctx = vda_hw... | vuln | Safe | C/C++ |
JPEGSetupEncode(TIFF* tif)
{
JPEGState* sp = JState(tif);
TIFFDirectory *td = &tif->tif_dir;
static const char module[] = "JPEGSetupEncode";
#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG)
if( tif->tif_dir.td_bitspersample == 12 )
return TIFFReInitJPEG_12( tif, COMPRESSION_JPEG, 1 );
... | vuln | Vulnerable | Unknown |
@Override
@NotNull
public IntegrityData getIntegrity() throws IntegrityException{
synchronized(this){
if(Objects.nonNull(currentIntegrity) && currentIntegrity.getExpiration().minus(Duration.ofMinutes(5)).isAfter(TimeFactory.now())){
return currentIntegrity;
}
log.info("Querying new integrity token"... | vuln | Vulnerable | Java |
static int mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s)
{
AVStream *video_st = s->streams[0];
AVCodecParameters *video_par = s->streams[0]->codecpar;
AVCodecParameters *audio_par = s->streams[1]->codecpar;
int audio_rate = audio_par->sample_rate;
int64_t frame_rate = (video_s... | vuln | Vulnerable | C/C++ |
static int virtio_rng_load(QEMUFile *f, void *opaque, int version_id)
{
if (version_id != 1) {
return -EINVAL;
}
return virtio_load(VIRTIO_DEVICE(opaque), f, version_id);
} | vuln | Vulnerable | C/C++ |
int ip_ra_control(struct sock *sk, unsigned char on,
void (*destructor)(struct sock *))
{
struct ip_ra_chain *ra, *new_ra;
struct ip_ra_chain __rcu **rap;
struct net *net = sock_net(sk);
if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num == IPPROTO_RAW)
return -EINVAL;
new_ra = on ? kmalloc(sizeof(*new_r... | vuln | Safe | C/C++ |
static int unix_getpw(UNUSED void *instance, REQUEST *request,
VALUE_PAIR **vp_list)
{
const char *name;
const char *encrypted_pass;
#ifdef HAVE_GETSPNAM
struct spwd *spwd = NULL;
#endif
#ifdef OSFC2
struct pr_passwd *pr_pw;
#else
struct passwd *pwd;
#endif
#ifdef HAVE_GETUSERSHELL
char *shell;
#endif
V... | vuln | Vulnerable | C/C++ |
sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
{
struct net_local *nl = (struct net_local *) dev->priv;
struct sbni_flags flags;
int error = 0;
#ifdef CONFIG_SBNI_MULTILINE
struct net_device *slave_dev;
char slave_name[ 8 ];
#endif
switch( cmd ) {
case SIOCDEVGETINSTATS :
if (... | vuln | Vulnerable | Unknown |
OMX_ERRORTYPE SoftGSM::internalSetParameter(
OMX_INDEXTYPE index, const OMX_PTR params) {
switch (index) {
case OMX_IndexParamAudioPcm:
{
OMX_AUDIO_PARAM_PCMMODETYPE *pcmParams =
(OMX_AUDIO_PARAM_PCMMODETYPE *)params;
if (pcmParams->nPortIndex != 0 && pcmParams->... | vuln | Vulnerable | C/C++ |
/* $Id: tif_ojpeg.c,v 1.24.2.6 2010-06-08 23:29:51 bfriesen Exp $ */
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
specification is now totally obsolete and deprecated for new applications and
images. This file was was created solely in order to read unconverted images
still prese... | vuln | Safe | C/C++ |
/*
* NSV demuxer
* Copyright (c) 2004 The Libav Project
*
* first version by Francois Revol <revol@free.fr>
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Founda... | vuln | Vulnerable | C/C++ |
evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen)
{
size_t used = buf->misalign + buf->off;
size_t oldoff = buf->off;
if (buf->totallen - used < datlen) {
if (evbuffer_expand(buf, datlen) == -1)
return (-1);
}
memcpy(buf->buffer + buf->off, data, datlen);
buf->off += datlen;
if (datlen ... | vuln | Safe | C/C++ |
window._load_metadata = function(ev, viewport) {
/* Image details */
var tmp = viewport.getMetadata();
$('#wblitz-image-name').html(tmp.imageName.escapeHTML());
$('#wblitz-image-description-content').html(tmp.imageDescription.escapeHTML().replace(/\n/g, '<br />'));
$('#wblitz-im... | vuln | Safe | JavaScript |
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
/*
* Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks
* algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number
* Theory", algorithm 1.5.1). 'p' must be prime!
*/
{
BIGNUM *ret = in;
int err = ... | vuln | Vulnerable | Unknown |
static njs_int_t
njs_array_prototype_splice(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
int64_t i, n, start, length, items, delta, delete;
njs_int_t ret;
njs_value_t *this, value, del_object;
njs_array_t *array, *deleted;
this = njs_argument(args, 0);
... | vuln | Vulnerable | C/C++ |
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator p... | vuln | Safe | Java |
void LibRaw::parseSonySR2(uchar *cbuf_SR2, unsigned SR2SubIFDOffset,
unsigned SR2SubIFDLength, unsigned dng_writer)
{
unsigned c;
unsigned entries, tag_id, tag_type, tag_datalen;
INT64 sr2_offset, tag_offset, tag_data, tag_dataoffset;
int TagProcessed;
int tag_dataunitlen;
float nu... | vuln | Safe | Unknown |
static void drop_futex_key_refs(union futex_key *key)
{
if (!key->both.ptr) {
/* If we're here then we tried to put a key we failed to get */
WARN_ON_ONCE(1);
return;
}
if (!IS_ENABLED(CONFIG_MMU))
return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
case FUT_OFF_INODE:
iput(key->shar... | vuln | Vulnerable | Unknown |
/*********************************************************************
*
* Filename: irqueue.c
* Version: 0.3
* Description: General queue implementation
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Jun 9 13:29:31 1998
* Modified at: Sun Dec 1... | vuln | Vulnerable | C/C++ |
public void attemptToLoadCard(String encodedCardName, String setCode) {
CardDb.CardRequest r = CardRequest.fromString(encodedCardName);
String cardName = r.cardName;
CardRules rules = cardReader.attemptToLoadCard(cardName, setCode);
CardRules customRules = customCardReader.attemptToLoadC... | vuln | Vulnerable | Java |
static void mmio_interface_realize(DeviceState *dev, Error **errp)
{
MMIOInterface *s = MMIO_INTERFACE(dev);
DPRINTF("realize from 0x%" PRIX64 " to 0x%" PRIX64 " map host pointer"
" %p\n", s->start, s->end, s->host_ptr);
if (!s->host_ptr) {
error_setg(errp, "host_ptr property must be set... | vuln | Vulnerable | C/C++ |
static int ref_pic_list_struct(GetBitContext *gb, RefPicListStruct *rpl)
{
uint32_t delta_poc_st, strp_entry_sign_flag = 0;
rpl->ref_pic_num = get_ue_golomb_long(gb);
if (rpl->ref_pic_num > 0) {
delta_poc_st = get_ue_golomb_long(gb);
rpl->ref_pics[0] = delta_poc_st;
if (rpl->ref_pic... | vuln | Vulnerable | C/C++ |
function showChannelHighlights() {
var tbody = $('.js-highlights-tbody');
var rows = "";
var shouldSortTable = true;
for (var i = 0; i < highlightsStats.streams.length; i++) {
var strm = highlightsStats.streams[i];
var row = '<tr>';
row += '<td><span class="fake-link js-highlig... | vuln | Safe | 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 applica... | vuln | Safe | Python |
static void wsgi_setup_access(WSGIDaemonProcess *daemon)
{
/* Setup the umask for the effective user. */
if (daemon->group->umask != -1)
umask(daemon->group->umask);
/* Change to chroot environment. */
if (daemon->group->root) {
if (chroot(daemon->group->root) == -1) {
ap_... | vuln | Safe | C/C++ |
private Token getToken() {
tokenStart = tokenEnd;
while (tokenStart < original.length()) {
char c = original.charAt(tokenStart);
if (!((c == '~') || (c == '-') || Character.isWhitespace(c))) {
break;
}
tokenStart++;
}
tokenE... | vuln | Vulnerable | Java |
/*!
* merge-deep <https://github.com/jonschlinkert/merge-deep>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var union = require('arr-union');
var clone = require('clone-deep');
var typeOf = require('kind-of');
module.exports = function mergeDeep(orig, objects) ... | vuln | Vulnerable | JavaScript |
private List<MatchingDocument> pairwiseRanking(String atitle,
String firstAuthor,
String jtitle,
String btitle,
String year,
... | vuln | Safe | Java |
public function isBlacklisted($ip, $username)
{
// first remove old expired rows
$this->clean();
// count
$params = array('conditions' => array(
'Bruteforce.ip' => $ip,
'Bruteforce.username' => $username),);
$count = $this->find... | vuln | Vulnerable | PHP |
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... | vuln | Vulnerable | Java |
static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
{
struct usb_device *dev = chip->dev;
struct usb_host_interface *host_iface;
struct usb_interface_descriptor *altsd;
void *control_header;
int i, protocol;
/* find audiocontrol interface */
host_iface = &usb_ifnum_to_if(dev, ctrlif)... | vuln | Vulnerable | C/C++ |
@Override
public void render(int mouseX, int mouseY, float partialTicks) {
VersionedFunctions.drawDarkBackground(0, 0, height, width);
// Old chunks
int minX = MathHelper.floor(displayXToChunkX(0) / 32.0);
int maxX = MathHelper.floor(displayXToChunkX(width) / 32.0);
int minZ = MathHelper.floor(displayZToChu... | vuln | Safe | Java |
// Copyright 2013 Unknown
//
// 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 writ... | vuln | Vulnerable | Go |
static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
MatroskaDemuxContext *matroska = s->priv_data;
EbmlList *attachements_list = &matroska->attachments;
MatroskaAttachement *attachements;
EbmlList *chapters_list = &matroska->chapters;
MatroskaChapter *chapters;
Matroska... | vuln | Safe | C/C++ |
xlate_to_uni(const unsigned char *name, int len, unsigned char *outname,
int *longlen, int *outlen, int escape, int utf8,
struct nls_table *nls)
{
const unsigned char *ip;
unsigned char nc;
unsigned char *op;
unsigned int ec;
int i, k, fill;
int charlen;
if (utf8) {
*outlen = utf8s_to_utf16s(name,... | vuln | Vulnerable | C/C++ |
@SuppressWarnings("unchecked")
public void authorized(Subject var) throws SurenessAuthorizationException {
List<String> ownRoles = (List<String>)var.getOwnRoles();
List<String> supportRoles = (List<String>)var.getSupportRoles();
if (supportRoles == null || supportRoles.isEmpty() || (ownRoles... | vuln | Safe | Java |
static void vga_draw_graphic(VGACommonState *s, int full_update)
{
DisplaySurface *surface = qemu_console_surface(s->con);
int y1, y, update, linesize, y_start, double_scan, mask, depth;
int width, height, shift_control, line_offset, bwidth, bits;
ram_addr_t page0, page1;
DirtyBitmapSnapshot *snap =... | vuln | Vulnerable | Unknown |
static bool TryParse(const char* inp, int length,
TypedValue* buf, Variant& out,
JSONContainerType container_type, bool is_tsimplejson) {
SimpleParser parser(inp, length, buf, container_type, is_tsimplejson);
bool ok = parser.parseValue();
parser.skipSpace();
... | vuln | Vulnerable | C/C++ |
QDict *qobject_to_qdict(const QObject *obj)
{
if (!obj || qobject_type(obj) != QTYPE_QDICT) {
return NULL;
}
return container_of(obj, QDict, base);
} | vuln | Safe | C/C++ |
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
* file.c
*
* File open, close, extend, truncate
*
* Copyright (C) 2002, 2004 Oracle. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* Lic... | vuln | Vulnerable | C/C++ |
_gsasl_gssapi_server_step (Gsasl_session * sctx,
void *mech_data,
const char *input, size_t input_len,
char **output, size_t *output_len)
{
_Gsasl_gssapi_server_state *state = mech_data;
gss_buffer_desc bufdesc1, bufdesc2;
OM_uint32 maj_stat, min_stat;
gss_buffer_desc client_name;
gss_OID me... | vuln | Vulnerable | C/C++ |
int qcow2_check_metadata_overlap(BlockDriverState *bs, int ign, int64_t offset,
int64_t size)
{
BDRVQcowState *s = bs->opaque;
int chk = s->overlap_check & ~ign;
int i, j;
if (!size) {
return 0;
}
if (chk & QCOW2_OL_MAIN_HEADER) {
if (offset < s->... | vuln | Safe | C/C++ |
/* 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++ |
int cp_vbnn_sig(ec_t r, bn_t z, bn_t h, const uint8_t *id, size_t id_len,
const uint8_t *msg, int msg_len, const bn_t sk, const ec_t pk) {
size_t len;
uint8_t *buf = NULL, *buf_i, hash[RLC_MD_LEN];
bn_t n, y;
ec_t t;
int result = RLC_OK;
/* zero variables */
bn_null(n);
bn_null(y);
ec_null(t);
RLC_TRY {
... | vuln | Safe | C/C++ |
/* zmalloc - total amount of allocated memory aware version of malloc()
*
* Copyright (c) 2009-2010, 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 ar... | vuln | Safe | C/C++ |
bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
struct bsg_device *bd = file->private_data;
ssize_t bytes_written;
int ret;
dprintk("%s: write %Zd bytes\n", bd->name, count);
bsg_set_block(bd, file);
bytes_written = 0;
ret = __bsg_write(bd, buf, count, &bytes_written,
... | vuln | Vulnerable | C/C++ |
export function deepExtend (a, b) {
// TODO: add support for Arrays to deepExtend
if (Array.isArray(b)) {
throw new TypeError('Arrays are not supported by deepExtend')
}
for (const prop in b) {
if (hasOwnProperty(b, prop)) {
if (b[prop] && b[prop].constructor === Object) {
if (a[prop] ===... | vuln | Vulnerable | JavaScript |
static int wrap_nettle_hash_fast(gnutls_digest_algorithm_t algo,
const void *text, size_t text_size,
void *digest)
{
struct nettle_hash_ctx ctx;
int ret;
ret = _ctx_init(algo, &ctx);
if (ret < 0)
return gnutls_assert_val(ret);
if (text_size > 0) {
ctx.update(&ctx, text_size, text);
}
ctx.digest(&... | vuln | Safe | C/C++ |
static bool virtio_scsi_data_plane_handle_event(VirtIODevice *vdev,
VirtQueue *vq)
{
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
assert(s->ctx && s->dataplane_started);
return virtio_scsi_handle_event_vq(s, vq);
} | vuln | Vulnerable | C/C++ |
static void ahash_op_unaligned_done(struct crypto_async_request *req, int err)
{
struct ahash_request *areq = req->data;
/*
* Restore the original request, see ahash_op_unaligned() for what
* goes where.
*
* The "struct ahash_request *req" here is in fact the "req.base"
* from the ADJUSTED request from aha... | vuln | Vulnerable | Unknown |
function Br(e){return B.List.isList(e)?e:I()(e)?Object(B.fromJS)(e):Object(B.List)()} | vuln | Vulnerable | JavaScript |
// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
// Copyright Dirk Lemstra 2013-2017
//
// Implementation of Image
//
#define MAGICKCORE_IMPLEMENTATION 1
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
#include "Magick++/Include.h"
#include <cstdlib>
#... | vuln | Safe | C/C++ |
function update($vars, &$errors) {
$vars = Format::htmlchars($vars);
if (!$vars['grace_period'])
$errors['grace_period'] = __('Grace period required');
elseif (!is_numeric($vars['grace_period']))
$errors['grace_period'] = __('Numeric value required (in hours)');
e... | vuln | Safe | PHP |
@Inject(method = "drawScreen", at = @At("HEAD"), cancellable = true)
private void drawScreenHead(CallbackInfo callbackInfo){
final Animations animMod = (Animations) LiquidBounce.moduleManager.getModule(Animations.class);
ChestStealer chestStealer = (ChestStealer) LiquidBounce.moduleManager.getModule... | vuln | Safe | Java |
static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s,
void *last, void *dst, int last2, int w,
int stride, int comp, int bits)
{
int i, x = 0;
int Ra, Rb, Rc, Rd;
int D0, D1, D2;
while (x < w) {
int err, pred... | vuln | Safe | C/C++ |
TEST_F(ZNCTest, Modpython) {
if (QProcessEnvironment::systemEnvironment().value(
"DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
return;
}
auto znc = Run();
znc->CanLeak();
auto ircd = ConnectIRCd();
auto client = LoginClient();
client.Write("znc loadmod modpython");
clien... | vuln | Vulnerable | Unknown |
package api
// Visibility is the type of a visibility.
type Visibility string
const (
// Public is the PUBLIC visibility.
Public Visibility = "PUBLIC"
// Protected is the PROTECTED visibility.
Protected Visibility = "PROTECTED"
// Private is the PRIVATE visibility.
Private Visibility = "PRIVATE"
)
func (e Visi... | vuln | Safe | Go |
vlog_message(const int facility, const char* format, va_list args)
{
#if !HAVE_VSYSLOG
char buf[MAX_LOG_MSG+1];
vsnprintf(buf, sizeof(buf), format, args);
#endif
/* Don't write syslog if testing configuration */
if (__test_bit(CONFIG_TEST_BIT, &debug))
return;
if (log_file || (__test_bit(DONT_FORK_BIT, &debug... | vuln | Vulnerable | Unknown |
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_mini_conn.c -- Mini connection.
*
* Mini connection is only used in server mode -- this assumption is relied
* upon by the code in this file.
*
* The purpose of this connection is to process incoming handshakes using
* minimal ... | vuln | Vulnerable | C/C++ |
bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
if (!render_frame_created_)
return false;
ScopedActiveURL scoped_active_url(this);
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderFrameHostImpl, msg)
IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone)
IP... | vuln | Safe | C/C++ |
char *vnc_display_local_addr(const char *id)
{
VncDisplay *vs = vnc_display_find(id);
return vnc_socket_local_addr("%s:%s", vs->lsock);
} | vuln | Vulnerable | C/C++ |
long uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
const char* si;
const char* st;
unsigned c;
char* ds;
int rc;
ds = d;
for (si = s; si < se; /* empty */) {
st = si;
c = uv__utf8_decode1(&si, se);
if (c != '.')
if (c != 0x3002) /* 。 */
if (c != 0xFF0E)... | vuln | Vulnerable | C/C++ |
private File unzip(final String id, final File zipFile, final String dest) throws IOException {
final File targetDirectory = new File(this.documentsDir, Paths.get(dest).normalize().toString());
final ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));
... | vuln | Safe | Java |
static int integratorcm_init(SysBusDevice *dev)
{
IntegratorCMState *s = INTEGRATOR_CM(dev);
s->cm_osc = 0x01000048;
s->cm_auxosc = 0x0007feff;
s->cm_sdram = 0x00011122;
if (s->memsz >= 256) {
integrator_spd[31] = 64;
s->cm_sdram |= 0x10;
} else if (s->memsz >= 128) {
... | vuln | Vulnerable | C/C++ |
static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
const char *language,
kbd_layout_t *k)
{
FILE *f;
char * filename;
char line[1024];
int len;
filename = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, l... | vuln | Vulnerable | C/C++ |
/*
* Copyright 2014 Ted Dunning
*
* 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 | Java |
static __be32 nfsacld_proc_setacl(struct svc_rqst * rqstp,
struct nfsd3_setaclargs *argp,
struct nfsd_attrstat *resp)
{
struct inode *inode;
svc_fh *fh;
__be32 nfserr = 0;
int error;
dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh));
fh = fh_copy(&resp->fh, &argp->fh);
nfserr = fh_verify(rqstp, &r... | vuln | Safe | C/C++ |
jio_snprintf(char * str, int n, const char * format, ...)
{
va_list args;
int result;
Trc_SC_snprintf_Entry();
va_start(args, format);
#if defined(WIN32) && !defined(WIN32_IBMC)
result = _vsnprintf( str, n, format, args );
#else
result = vsprintf( str, format, args );
#endif
va_end(args);
Trc_SC_snprintf_Exi... | vuln | Vulnerable | C/C++ |
static int piv_validate_general_authentication(sc_card_t *card,
const u8 * data, size_t datalen,
u8 * out, size_t outlen)
{
piv_private_data_t * priv = PIV_DATA(card);
int r, tmplen, tmplen2;
u8 *p;
const u8 *tag;
size_t taglen;
const u8 *body;
size_t bodylen;
unsigned int real_alg_id, op_tag;
u8 sb... | vuln | Vulnerable | C/C++ |
public void place(PlacementResult result) throws LittleActionException {
boolean hascollideBlock = false;
for (int i = 0; i < previews.length; i++)
if (previews[i] != null)
for (Iterator<PlacePreview> iterator = previews[i].iterator(); iterator.hasNext();) {
... | vuln | Safe | Java |
void ep_mul_sim_lot_plain(ep_t r, const ep_t p[], const bn_t k[], int n) {
int i, j;
int8_t *naf = NULL;
ep_t *_p = RLC_ALLOCA(ep_t, n);
size_t l, *_l = RLC_ALLOCA(size_t, n);
RLC_TRY {
l = 0;
for (i = 0; i < n; i++) {
l = RLC_MAX(l, bn_bits(k[i]) + 1);
}
naf = RLC_ALLOCA(int8_t, n * l);
if (naf == N... | vuln | Safe | C/C++ |
from django.contrib import admin
import import_export.widgets as widgets
from import_export.admin import ImportExportModelAdmin
from import_export.fields import Field
from import_export.resources import ModelResource
from .models import (PurchaseOrder, PurchaseOrderExtraLine,
PurchaseOrderLineIte... | vuln | Vulnerable | Python |
/* 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 | Vulnerable | Python |
xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
xmlEntityPtr ent, size_t replacement)
{
size_t consumed = 0;
if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
return (0);
if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
return (1);
/*
* This may... | vuln | Safe | Unknown |
public void signalStopService(boolean userInitiated) {
LogWrapper.log(
Log.INFO,
LOG_TAG,
String.format("Received stop signal. User initiated: %b", userInitiated));
if (!userInitiated) {
final long[] vibrationPattern = {1000}; // Vibrate for one second.
// Show revocation wa... | vuln | Safe | Java |
skip_expr_concatenate(
char_u **arg,
char_u **start,
char_u **end,
evalarg_T *evalarg)
{
typval_T rettv;
int res;
int vim9script = in_vim9script();
garray_T *gap = evalarg == NULL ? NULL : &evalarg->eval_ga;
garray_T *freegap = evalarg == NULL ? NULL : &evalarg->eval_freega... | vuln | Vulnerable | 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... | vuln | Vulnerable | Python |
public void setView(View view, WindowManager.LayoutParams attrs, View panelParentView,
int userId) {
synchronized (this) {
if (mView == null) {
mView = view;
mViewLayoutDirectionInitial = mView.getRawLayoutDirection();
mFallbackEventHandle... | vuln | Vulnerable | Java |
static int dev_ifconf(struct net *net, struct compat_ifconf __user *uifc32)
{
struct compat_ifconf ifc32;
struct ifconf ifc;
struct ifconf __user *uifc;
struct compat_ifreq __user *ifr32;
struct ifreq __user *ifr;
unsigned int i, j;
int err;
if (copy_from_user(&ifc32, uifc32, sizeof(struct compat_ifconf)))
... | vuln | Safe | C/C++ |
xsltGetQNameProperty(xsltStylesheetPtr style, xmlNodePtr inst,
const xmlChar *propName,
int mandatory,
int *hasProp, const xmlChar **nsName,
const xmlChar** localName)
{
const xmlChar *prop;
if (nsName)
*nsName = NULL;
if (localName)
*localName = NULL;
if (hasProp)
*hasPr... | vuln | Vulnerable | C/C++ |
public Builder setClientOnly() {
if (Boolean.TRUE.equals(config.serverOnly)) {
throw new IllegalStateException("client only is in contradiction to server only!");
} else if (config.clientAuthenticationRequired != null || config.clientAuthenticationWanted != null) {
throw new IllegalStateException(
"... | vuln | Safe | Java |
private Uni<SecurityIdentity> authenticateWithClientCredentials(Pair<String, String> clientCredentials, RoutingContext context, IdentityProviderManager identityProviderManager) {
String jwtToken;
String credentialsHash = getCredentialsHash(clientCredentials.getLeft() + clientCredentials.getRight());
... | vuln | Vulnerable | Java |
public static boolean requestSDCardPermission(final Activity activity){
if (activity.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (activity.shouldShowRequestPermissionRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
new MaterialAlertDialogB... | vuln | Safe | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.