code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct winbindd_cli_state *cli,
struct winbindd_request *request)
{
struct tevent_req *req, *subreq;
struct winbindd_lookupsids_state *state;
req = tevent_req_create(mem_ctx, &state,
struct winbi... | vuln | Vulnerable | Unknown |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Vulnerable | C/C++ |
void machine_register_compat_props(MachineState *machine)
{
MachineClass *mc = MACHINE_GET_CLASS(machine);
int i;
GlobalProperty *p;
if (!mc->compat_props) {
return;
}
for (i = 0; i < mc->compat_props->len; i++) {
p = g_array_index(mc->compat_props, GlobalProperty *, i);
... | vuln | Safe | C/C++ |
do_mouse(
oparg_T *oap, // operator argument, can be NULL
int c, // K_LEFTMOUSE, etc
int dir, // Direction to 'put' if necessary
long count,
int fixindent) // PUT_FIXINDENT if fixing indent necessary
{
static int do_always = FALSE; // ignore 'mouse' setting next time
static int got_cli... | vuln | Vulnerable | C/C++ |
from __future__ import unicode_literals
from itertools import chain
import re
import string
import six
from xml.sax.saxutils import unescape
import html5lib
from html5lib.constants import (
entities,
namespaces,
prefixes,
tokenTypes,
)
try:
from html5lib.constants import ReparseException
except Im... | vuln | Vulnerable | Python |
/*
* Copyright (C) 2003, 2004, 2005 Joe Walnes.
* Copyright (C) 2006, 2007, 2010, 2011, 2013, 2018, 2021 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.tx... | vuln | Safe | Java |
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public static boolean isValidHexLine(final String line) {
if(line.isEmpty())
return true;
return line.matches("\\p{XDigit}+") && isEven(line.length()) && (line.length() <= (SysHelper.MAX_BY_ROW * 2));
} | vuln | Safe | Java |
public boolean checkAttack(final Mob mob, final boolean missile) {
if (mob.isPlayer()) {
Player victim = (Player) mob;
if (getParty() != null && ((Player) mob).getParty() != null && getParty() == ((Player) mob).getParty()) {
message("You can't attack your party members");
return false;
}
if ((inCo... | vuln | Safe | Java |
static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
if (arm_feature(env, ARM_FEATURE_LPAE)) {
value &= ~((7 << 19) | (3 << 14) | (0xf << 3));
} else {
value &= 7;
}
env->cp15.c2_control = value;
env->cp15.c2... | vuln | Vulnerable | C/C++ |
static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local,
u8 mandatory, u8 const *sp_val, u8 sp_len)
{
dccp_feat_val fval;
if (dccp_feat_type(feat) != FEAT_SP ||
!dccp_feat_sp_list_ok(feat, sp_val, sp_len))
return -EINVAL;
/* Avoid negotiating alien CCIDs by only advertising support... | vuln | Vulnerable | C/C++ |
/* IIP Server: Kakadu JPEG2000 handler
Initial development supported by Moravian Library in Brno (Moravska zemska
knihovna v Brne, http://www.mzk.cz/) R&D grant MK00009494301 & Old
Maps Online (http://www.oldmapsonline.org/) from the Ministry of
Culture of the Czech Republic.
Copyright (C) 2009... | vuln | Safe | C/C++ |
char *parse_tags(ASS_Renderer *render_priv, char *p, char *end, double pwr)
{
for (char *q; p < end; p = q) {
while (*p != '\\' && p != end)
++p;
if (*p != '\\')
break;
++p;
if (p != end)
skip_spaces(&p);
q = p;
while (*q != '(' &&... | vuln | Vulnerable | Unknown |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webgateway/views.py - django application view handling functions
#
# Copyright (c) 2007-2020 Glencoe Software, Inc. All rights reserved.
#
# This software is distributed under the terms described by the LICENCE file
# you can find at the root of the distribution bundle,... | vuln | Vulnerable | Python |
static pyc_object *get_array_object_generic(RBuffer *buffer, ut32 size) {
pyc_object *tmp = NULL;
pyc_object *ret = NULL;
ut32 i = 0;
ret = R_NEW0 (pyc_object);
if (!ret) {
return NULL;
}
ret->data = r_list_newf ((RListFree)free_object);
if (!ret->data) {
free (ret);
return NULL;
}
for (i = 0; i < size... | vuln | Vulnerable | C/C++ |
static void gf_media_update_bitrate_ex(GF_ISOFile *file, u32 track, Bool use_esd)
{
#ifndef GPAC_DISABLE_ISOM_WRITE
u32 i, count, timescale, db_size, cdur, csize;
u64 time_wnd, max_rate, avg_rate, bitrate;
Double br;
GF_ISOSample sample;
db_size = 0;
max_rate = avg_rate = time_wnd = bitrate = 0;
csize = 0;
cd... | vuln | Safe | C/C++ |
R_API bool r_io_bank_map_add_top(RIO *io, const ut32 bankid, const ut32 mapid) {
RIOBank *bank = r_io_bank_get (io, bankid);
RIOMap *map = r_io_map_get (io, mapid);
r_return_val_if_fail (io && bank && map, false);
RIOMapRef *mapref = _mapref_from_map (map);
if (!mapref) {
return false;
}
RIOSubMap *sm = r_io_s... | vuln | Safe | Unknown |
parseInt(u.getAttribute("height"))+6),E=u.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,u.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!... | vuln | Vulnerable | JavaScript |
static void udf_pc_to_char(struct super_block *sb, unsigned char *from,
int fromlen, unsigned char *to)
{
struct pathComponent *pc;
int elen = 0;
unsigned char *p = to;
while (elen < fromlen) {
pc = (struct pathComponent *)(from + elen);
switch (pc->componentType) {
case 1:
/*
* Symlink ... | vuln | Vulnerable | C/C++ |
static int libusb_udev_isoch_transfer(IUDEVICE* idev, URBDRC_CHANNEL_CALLBACK* callback,
UINT32 MessageId, UINT32 RequestId, UINT32 EndpointAddress,
UINT32 TransferFlags, UINT32 StartFrame, UINT32 ErrorCount,
... | vuln | Safe | C/C++ |
static int svq1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MpegEncContext *s=avctx->priv_data;
uint8_t *current, *previous;
int res... | vuln | Safe | C/C++ |
function printCard() {
getData()
let html = ""
for (let i = 0; i < entries.length; i++) {
let entry = entries[i]
entry.residency = entry.zip + " " + entry.residency
if (!entry.sex) entry.sex = "uk"
html += `<div>
<p class="name">${entry.name}</p>
<p cl... | vuln | Vulnerable | JavaScript |
@Override
public void registerTranslators() {
// login
addTranslator(0x01, PacketDirection.TO_SERVER, new PacketTranslator() {
@Override
public PacketData translate(ServerSession session, PacketData data) {
return PacketUtil.createPacket(0x01, new TypeHolder... | vuln | Safe | Java |
mask_dict_param(const gs_memory_t *mem, os_ptr op,
image_params *pip_data, const char *dict_name,
int num_components, gs_image3x_mask_t *pixm)
{
ref *pMaskDict;
image_params ip_mask;
int ignored;
int code, mcode;
if (dict_find_string(op, dict_name, &pMaskDict) <= 0)
return 1... | vuln | Safe | Unknown |
/**
* @file atecc608a-tnglora-se.c
*
* @brief ATECC608A-TNGLORA Secure Element hardware implementation
*
* @remark Current implementation only supports LoRaWAN 1.0.x version
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
* Revised BSD License
* Copyright The Things Industries B.V 2... | vuln | Safe | C/C++ |
/**
* (c) jSuites Javascript Web Components
*
* Website: https://jsuites.net
* Description: Create amazing web based applications.
*
* MIT License
*
*/
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' ... | vuln | Vulnerable | JavaScript |
function setter (obj, pointer, value) {
var part
var hasNextPart
if (pointer[1] === 'constructor' && pointer[2] === 'prototype') return obj
if (pointer[1] === '__proto__') return obj
for (var p = 1, len = pointer.length; p < len;) {
part = untilde(pointer[p++])
hasNextPart = len > p
if (typeof ... | vuln | Vulnerable | JavaScript |
MagickExport void *AcquireQuantumMemory(const size_t count,const size_t quantum)
{
size_t
extent;
if (HeapOverflowSanityCheck(count,quantum) != MagickFalse)
return((void *) NULL);
extent=count*quantum;
return(AcquireMagickMemory(extent));
} | vuln | Safe | C/C++ |
static int vc1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
if (buf_size == 0) ... | vuln | Safe | C/C++ |
/*
Copyright The containerd 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... | vuln | Safe | Go |
static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
uint chip;
uint addr, length;
int alen;
int j, nbytes, linebytes;
int ret;
#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *dev;
#endif
/* We use the last specified parameters, unless new ones are
* entered.
*/
chip ... | vuln | Vulnerable | C/C++ |
static av_cold int v4l2_encode_init(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *capture = &s->capture;
V4L2Context *output = &s->output;
int ret;
output->height = capture->height = avctx->height;
output->width = capture->width = avctx->width;
output-... | vuln | Vulnerable | C/C++ |
static int process_one_ticket(struct ceph_auth_client *ac,
struct ceph_crypto_key *secret,
void **p, void *end)
{
struct ceph_x_info *xi = ac->private;
int type;
u8 tkt_struct_v, blob_struct_v;
struct ceph_x_ticket_handler *th;
void *dbuf = NULL;
void *dp, *dend;
int dlen;
char is_enc;
struct... | vuln | Safe | C/C++ |
package com.salesmanager.shop.admin.model.reference;
import java.io.Serializable;
public class Weight implements Serializable {
/**
*
*/
private static final long serialVersionUID = -1006772612089740285L;
private String code;
private String name;
public String getName() {
return name;
}
public void se... | vuln | Vulnerable | Java |
'use strict';
const dictionary = require("./dictionary.js");
const g_constants = require("./constants.js");
const g_crypto = require('crypto');
const http = require('http');
const https = require('https');
const url = require('url');
var fs = require('fs');
const util = require('util');
const admin_utils = require(".... | vuln | Vulnerable | JavaScript |
#include "osxkeychain_darwin.h"
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/NSValue.h>
#include <stdio.h>
#include <string.h>
char *get_error(OSStatus status) {
char *buf = malloc(128);
CFStringRef str = SecCopyErrorMessageString(status, NULL);
int success = CFStringGetCString(str, buf, 128, ... | vuln | Safe | Go |
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 | Vulnerable | C/C++ |
static void get_sensor_reading(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(3);
if ((cmd[2] >= MAX_SENSOR... | vuln | Safe | C/C++ |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distribute... | vuln | Vulnerable | Java |
int
psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
{ va_list argptr ;
sf_count_t countdata ;
unsigned long longdata ;
unsigned int data ;
float floatdata ;
double doubledata ;
void *bindata ;
size_t size ;
char c, *strptr ;
int count = 0, trunc_8to4 ;
trunc_8to4 = SF_FALSE ;... | vuln | Vulnerable | C/C++ |
@Redirect(method = "updatePlayerMoveState", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/settings/KeyBinding;isKeyDown()Z"))
public boolean isKeyPressed(KeyBinding keyBinding) {
PlayerTweaks playerTweaks = ModuleManager.getModule(PlayerTweaks.class);
if (playerTweaks.isEnabled() && pl... | vuln | Vulnerable | Java |
/*
* Copyright 2009-2012 10gen, 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 | C/C++ |
find_ex_command(
exarg_T *eap,
int *full UNUSED,
int (*lookup)(char_u *, size_t, int cmd, cctx_T *) UNUSED,
cctx_T *cctx UNUSED)
{
int len;
char_u *p;
int i;
#ifndef FEAT_EVAL
int vim9 = FALSE;
#else
int vim9 = in_vim9script();
/*
* Recognize a Vim9 script function/method call and ... | vuln | Vulnerable | C/C++ |
/* sort - sort lines of text (with all kinds of options).
Copyright (C) 1988-2014 Free Software Foundation, Inc.
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 3 of the Li... | vuln | Safe | C/C++ |
int regcomp(regex_t *preg, const char *pattern, int cflags)
{
conopt_t globopts;
globopts.nested_negative_tags = !(cflags & (REG_NFA | REG_REGLESS));
globopts.FFlag = true;
globopts.backward = cflags & REG_BACKWARD;
globopts.stadfa = cflags & REG_STADFA;
Msg msg;
Opt opts(globopts, msg);
... | vuln | Safe | Unknown |
static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
BMPInfo
bmp_info;
Image
*image;
MagickBooleanType
status;
MagickOffsetType
offset,
start_position;
MemoryInfo
*pixel_info;
Quantum
index;
register Quantum
*q;
register ssize_t
i,... | vuln | Vulnerable | Unknown |
static int get_codec_data(AVIOContext *pb, AVStream *vst,
AVStream *ast, int myth)
{
nuv_frametype frametype;
if (!vst && !myth)
return 1;
while (!pb->eof_reached) {
int size, subtype;
frametype = avio_r8(pb);
switch (frametype) {
case NUV_E... | vuln | Vulnerable | C/C++ |
// Minimal tooling for doing run-at-least-once, ordered migrations.
//
// Because migrations can experience partial failure and likely have
// side-effects, we should be careful to make sure all migrations are
// idempotent and safe to accidentally run multiple times.
import { Meteor } from "meteor/meteor";
import { _... | vuln | Vulnerable | JavaScript |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Safe | C/C++ |
def verify(self, data):
credentials = self._formatCredentials(data, name='current')
command = '{} rclone lsjson current:'.format(credentials)
try:
result = self._execute(command)
return {
'result': True,
'message': 'Success',
}... | vuln | Vulnerable | Python |
/******************************************************************************
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
*
*****************************************************************************/
/*
* C... | vuln | Vulnerable | C/C++ |
int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,
const ASN1_ITEM *it)
{
ASN1_BOOLEAN *tbool = NULL;
ASN1_STRING *strtmp;
ASN1_OBJECT *otmp;
int utype;
const unsigned char *cont;
unsigned char c;
int len;
const ASN1_PRIMITIVE_FUNCS *pf;
pf = it->fun... | vuln | Safe | Unknown |
/*******************************************************************************
* Copyright (c) 2015, 2017 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 v2.0
* and Eclipse Distrib... | vuln | Safe | Java |
static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb,
bool vectored, bool compat)
{
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret)
return ret;
file = req->ki_filp;
ret = -EBADF;
if (u... | vuln | Vulnerable | Unknown |
WebstoreBindings::WebstoreBindings(ScriptContext* context)
: ObjectBackedNativeHandler(context) {
RouteFunction("Install",
base::Bind(&WebstoreBindings::Install, base::Unretained(this)));
} | vuln | Vulnerable | C/C++ |
hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
{
unsigned long orun = 1;
ktime_t delta;
delta = ktime_sub(now, timer->expires);
if (delta.tv64 < 0)
return 0;
if (interval.tv64 < timer->base->resolution.tv64)
interval.tv64 = timer->base->resolution.tv64;
if (unlikely(delta.tv64 >= in... | vuln | Safe | Unknown |
void gps_tracker( void )
{
ssize_t unused;
int gpsd_sock;
char line[256], *temp;
struct sockaddr_in gpsd_addr;
int ret, is_json, pos;
fd_set read_fd;
struct timeval timeout;
/* attempt to connect to localhost, port 2947 */
pos = 0;
gpsd_sock = socket( AF_INET, SOCK_STREAM, 0 );
... | vuln | Vulnerable | C/C++ |
rsvg_end_element (void *data, const xmlChar * name)
{
RsvgHandle *ctx = (RsvgHandle *) data;
if (ctx->priv->handler_nest > 0 && ctx->priv->handler != NULL) {
if (ctx->priv->handler->end_element != NULL)
ctx->priv->handler->end_element (ctx->priv->handler, (const char *) name);
ctx->... | vuln | Vulnerable | Unknown |
int print_insn_lm32(bfd_vma memaddr, struct disassemble_info *info)
{
fprintf_function fprintf_fn = info->fprintf_func;
void *stream = info->stream;
int rc;
uint8_t insn[4];
const Lm32OpcodeInfo *opc_info;
uint32_t op;
const char *args_fmt;
rc = info->read_memory_func(memaddr, insn, 4, i... | vuln | Vulnerable | C/C++ |
@Override
protected void onStop() {
super.onStop();
try {
unregisterReceiver(receiver);
} catch (IllegalArgumentException ignored) {
Log.w("MainActivity.onStop", "No BroadcastReceiver registered");
}
if (!transfer.get() && !dialogVisible && uploadMessa... | vuln | Safe | Java |
libspdm_return_t libspdm_get_response_capabilities(void *context,
size_t request_size,
const void *request,
size_t *response_size,
... | vuln | Safe | C/C++ |
static void fpm_worker_pool_cleanup(int which, void *arg) /* {{{ */
{
struct fpm_worker_pool_s *wp, *wp_next;
for (wp = fpm_worker_all_pools; wp; wp = wp_next) {
wp_next = wp->next;
fpm_worker_pool_config_free(wp->config);
fpm_children_free(wp->children);
if ((which & FPM_CLEANUP_CHILD) == 0 && fpm_globals.p... | vuln | Safe | Unknown |
static void scsi_command_complete(SCSIDiskReq *r, int status, int sense)
{
DPRINTF("Command complete tag=0x%x status=%d sense=%d\n",
r->req.tag, status, sense);
scsi_req_set_status(r, status, sense);
scsi_req_complete(&r->req);
} | vuln | Safe | C/C++ |
static inline void ff_h264_biweight_WxH_mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets, int w, int h)
{
int x, y;
int offset = ((offsets + offsetd + 1) | 1) << log2_denom;
asm volatile(
"movd %0, %%mm3 \n\t"
"movd ... | vuln | Safe | C/C++ |
////////////////////////////////////////////////////////////////////////////
// **** WAVPACK **** //
// Hybrid Lossless Wavefile Compressor //
// Copyright (c) 1998 - 2016 David Bryant. //
// ... | vuln | Vulnerable | C/C++ |
static int SetupSavePath(const DetectEngineCtx *de_ctx,
char *save, size_t save_size)
{
SCLogDebug("save %s", save);
int allow_save = 1;
if (ConfGetBool("datasets.rules.allow-write", &allow_save)) {
if (!allow_save) {
SCLogError(SC_ERR_INVALID_SIGNATURE,
"Rul... | vuln | Safe | C/C++ |
package query
import (
"context"
"fmt"
"net/http"
"time"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/expr"
"github.com/grafana/grafana/pkg/infra/httpclient/httpclientprovider"
"github.com/grafana/grafana/pkg/infra/log"
"git... | vuln | Vulnerable | Go |
clipboardTextParser(str, $context, _, view) {
const parser = DOMParser.fromSchema(view.state.schema)
const doc = document.cloneNode(false)
const dom = doc.createElement('div')
if (shiftKey) {
// Treat single newlines as linebreaks and double newlines as paragraph breaks when pasting as pl... | vuln | Vulnerable | JavaScript |
png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
{
png_infop info_ptr = *ptr_ptr;
png_debug(1, "in png_info_init_3");
if (info_ptr == NULL)
return;
if (png_sizeof(png_info) > png_info_struct_size)
{
png_destroy_struct(info_ptr);
info_ptr = (png_infop)png_create_... | vuln | Vulnerable | C/C++ |
static void virtio_blk_save_device(VirtIODevice *vdev, QEMUFile *f)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
VirtIOBlockReq *req = s->rq;
while (req) {
qemu_put_sbyte(f, 1);
qemu_put_buffer(f, (unsigned char *)req->elem,
sizeof(VirtQueueElement));
req = req->next;... | vuln | Vulnerable | C/C++ |
@Nonnull
@Override
public BlockRenderType getRenderType(@Nonnull BlockState state) {
return BlockRenderType.INVISIBLE;
} | vuln | Safe | Java |
static ssize_t sync_state_only_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct device_link *link = to_devlink(dev);
return sysfs_emit(buf, "%d\n",
!!(link->flags & DL_FLAG_SYNC_STATE_ONLY));
} | vuln | Safe | Unknown |
stf_status ikev2parent_inI1outR1(struct msg_digest *md)
{
struct state *st = md->st;
lset_t policy = POLICY_IKEV2_ALLOW;
struct connection *c = find_host_connection(&md->iface->ip_addr,
md->iface->port,
&md->sender,
md->sender_port,
POLICY_IKEV2_ALLOW);
/* retrieve st->st_gi... | vuln | Safe | C/C++ |
static void check_watchpoint(int offset, int len_mask, int flags)
{
CPUState *env = cpu_single_env;
target_ulong pc, cs_base;
TranslationBlock *tb;
target_ulong vaddr;
CPUWatchpoint *wp;
int cpu_flags;
if (env->watchpoint_hit) {
cpu_interrupt(env, CPU_INTERRUPT_DEBUG);
... | vuln | Safe | C/C++ |
static Image *ReadWEBPImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
int
webp_status;
MagickBooleanType
status;
register unsigned char
*p;
size_t
length;
ssize_t
count,
y;
unsigned char
header[12],
*stream;
WebPDecoderConfig
... | vuln | Vulnerable | C/C++ |
@Override
public String fromXML(String source) throws MessageSerializerException {
if (source == null || source.length() == 0) {
return org.apache.commons.lang3.StringUtils.EMPTY;
}
try {
// re-parse the xml to Mirth format
Document document = documentSer... | vuln | Safe | Java |
int
fixExec2Error(int action,
u_char * var_val,
u_char var_val_type,
size_t var_val_len,
u_char * statP, oid * name, size_t name_len)
{
netsnmp_old_extend *exten = NULL;
unsigned int idx;
idx = name[name_len-1] -1;
exten = &compatability_entries[ idx ... | vuln | Vulnerable | C/C++ |
def yaml_msgs_str(type_, yaml_str, filename=None):
"""
Load messages from YAML list-of-dictionaries representation.
@param type_: Message class
@type type_: class (Message subclass)
@param filename: Name of YAML file
@type filename: str
"""
import yaml
yaml_doc = yaml.safe_load(ya... | vuln | Safe | Python |
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: https://www.espocrm.com
*
* EspoCRM is free software: you can redistribute i... | vuln | Safe | JavaScript |
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* 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 version 3 of the License, or
... | vuln | Safe | C/C++ |
static int write_exit_mmio(struct kvm_vcpu *vcpu, gpa_t gpa,
void *val, int bytes)
{
memcpy(vcpu->mmio_data, val, bytes);
memcpy(vcpu->run->mmio.data, vcpu->mmio_data, 8);
return X86EMUL_CONTINUE;
} | vuln | Vulnerable | Unknown |
undo_time(
long step,
int sec,
int file,
int absolute)
{
long target;
long closest;
long closest_start;
long closest_seq = 0;
long val;
u_header_T *uhp = NULL;
u_header_T *last;
int mark;
int nomark = 0; // shut up compiler
... | vuln | Vulnerable | Unknown |
def _associate_dests_to_pages(self, pages):
for nd in self.named_dests:
pageno = None
np = nd['/Page']
if isinstance(np, NumberObject):
continue
for p in pages:
if np.getObject() == p.pagedata.getObject():
page... | vuln | Safe | Python |
static int qcow2_mark_clean(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
int ret;
s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;
ret = bdrv_flush(bs);
if (ret < 0) {
return ret;
}
ret... | vuln | Safe | C/C++ |
@Override
public void doConfigure(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException {
super.doConfigure(configuration);
if (isEnabled()) {
authRequired = Optional.ofNullable(configuration.configurationAt("auth"))
.flatMap(authConfigurat... | vuln | Vulnerable | Java |
function XMLRPCdeployServer($imageid, $start, $end, $admingroup='',
$logingroup='', $ipaddr='', $macaddr='',
$monitored=0, $foruser='', $name='') {
global $user, $remoteIP;
if(! in_array("serverProfileAdmin", $user["privileges"])) {
return array('status' => 'e... | vuln | Safe | PHP |
/*
** SQLCipher
** http://sqlcipher.net
**
** Copyright (c) 2008 - 2013, ZETETIC LLC
** 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 a... | vuln | Vulnerable | C/C++ |
int hidp_connection_add(struct hidp_connadd_req *req,
struct socket *ctrl_sock,
struct socket *intr_sock)
{
struct hidp_session *session;
struct l2cap_conn *conn;
struct l2cap_chan *chan;
int ret;
ret = hidp_verify_sockets(ctrl_sock, intr_sock);
if (ret)
return ret;
chan = l2cap_pi(ctrl_sock->sk)->chan... | vuln | Safe | C/C++ |
private void onPlpIds(int[] plpIds) {
if (mScanCallbackExecutor != null && mScanCallback != null) {
mScanCallbackExecutor.execute(() -> mScanCallback.onPlpIdsReported(plpIds));
}
} | vuln | Vulnerable | Java |
private void finalizeHandshake(AuthHandshakeResult handshakeResult) {
if (handshakeResult instanceof AuthHandshakeSuccess) {
final var successResult = (AuthHandshakeSuccess) handshakeResult;
this.remoteNodeId = successResult.getRemoteNodeId();
this.frameCodec = new FrameCodec(successResult.getSecrets());
... | vuln | Safe | Java |
empe_app_smime_parse (EMailParserExtension *extension,
EMailParser *parser,
CamelMimePart *part,
GString *part_id,
GCancellable *cancellable,
GQueue *out_mail_parts)
{
CamelCipherContext *context;
CamelMimePa... | vuln | Vulnerable | Unknown |
/*
* pkcs15-sc-hsm.c : Initialize PKCS#15 emulation
*
* Copyright (C) 2012 Andreas Schwier, CardContact, Minden, Germany
*
* This library 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 Foundation; either
*... | vuln | Vulnerable | C/C++ |
#include <qpdf/Pl_ASCII85Decoder.hh>
#include <qpdf/QTC.hh>
#include <stdexcept>
#include <string.h>
Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) :
Pipeline(identifier, next),
pos(0),
eod(0)
{
memset(this->inbuf, 117, 5);
}
Pl_ASCII85Decoder::~Pl_ASCII85Decoder()
{
}
v... | vuln | Vulnerable | C/C++ |
package com.databasir.core.infrastructure.jwt;
import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTVerificationException;
import com.auth0.jwt.interfaces.JWTVerifier;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import ... | vuln | Safe | Java |
int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t end_addr)
{
return kvm_dirty_pages_log_change(phys_addr, end_addr,
0,
KVM_MEM_LOG_DIRTY_PAGES);
} | vuln | Vulnerable | C/C++ |
public static void FingerprintHapticSuccessHook(LoadPackageParam lpparam) {
String authClient = "com.android.server.biometrics.AuthenticationClient";
Helpers.hookAllMethods(authClient, lpparam.classLoader, "onAuthenticated", new MethodHook() {
@Override
protected void after(MethodHookParam param) throws Throw... | vuln | Vulnerable | Java |
static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
filename[MagickPathExtent];
FILE
*file;
Image
*image,
*next_image,
*pwp_image;
ImageInfo
*read_info;
int
c,
unique_file;
MagickBooleanType
status;
register Image
*p;
reg... | vuln | Vulnerable | C/C++ |
xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltElemPreCompPtr castedComp)
{
#ifdef XSLT_REFACTORED
xsltStyleItemDocumentPtr comp = (xsltStyleItemDocumentPtr) castedComp;
#else
xsltStylePreCompPtr comp = (xsltStylePreCompPtr) castedComp;
#endif
xsltStyle... | vuln | Safe | Unknown |
static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {{{ */
{
zend_generator *generator = (zend_generator*) Z_OBJ_P(object);
zend_execute_data *execute_data = generator->execute_data;
zend_op_array *op_array;
zval *gc_buffer;
uint32_t gc_buffer_size;
if (!execute_data) {
/* If the gen... | vuln | Vulnerable | Unknown |
public void remove(BlockPos blockPos) {
if (blocks != null) {
SBlock block = blocks.remove(SBlock.getKey(blockPos));
if (block != null) block.group.remove(block);
}
} | vuln | Safe | Java |
#include <uwsgi.h>
extern struct uwsgi_server uwsgi;
#ifdef __BIG_ENDIAN__
uint16_t uwsgi_swap16(uint16_t x) {
return (uint16_t) ((x & 0xff) << 8 | (x & 0xff00) >> 8);
}
uint32_t uwsgi_swap32(uint32_t x) {
x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0x00FF00FF);
return (x >> 16) | (x << 16);
}
// thanks to ffmpeg... | vuln | Safe | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.