code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsStage* Curve1, *Curve2;
cmsStage* Matrix1, *Matrix2;
_cmsStageMatrixData* Data1;
_cmsStageMatrixData* Data2;
cmsMAT3 res;
cmsBool Id... | vuln | Vulnerable | Unknown |
static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int slot;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
MachineState *machine = MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM... | vuln | Safe | C/C++ |
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import os
import tarfile
import zipfile
from collections import defa... | vuln | Vulnerable | Python |
public static PlayerEntity getPlayerBySight(World world, PlayerEntity player) {
Vec3d playerPos = player.getEyePos();
Vec3d rotVector = player.getRotationVector();
for (int i = 0; i < 16; i++) {
playerPos = playerPos.add(rotVector);
BlockState state = world.getBlockState... | vuln | Vulnerable | Java |
void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utterance, bool errorOccurred)
{
ASSERT(utterance);
bool didJustFinishCurrentUtterance = false;
if (utterance == currentSpeechUtterance()) {
m_utteranceQueue.removeFirst();
didJustFinishCurrentUtterance = true;
... | vuln | Vulnerable | C/C++ |
def impersonateWithKey(key: String): Action[Unit] = GetActionIsLogin { request =>
// Dupl code? Reuse /-/v0/login-with-secret instead? [7AKBRW02]
// Delete the key so no one else can use it, in case Mallory sees it in a log file.
val redisTransaction = redis.transaction()
val futureGetResult = redisTr... | vuln | Vulnerable | Scala |
exif_data_load_data_content (ExifData *data, ExifIfd ifd,
const unsigned char *d,
unsigned int ds, unsigned int offset, unsigned int recursion_depth)
{
ExifLong o, thumbnail_offset = 0, thumbnail_length = 0;
ExifShort n;
ExifEntry *entry;
unsigned int i;
ExifTag tag;
if (!data || !data->priv)
... | vuln | Vulnerable | C/C++ |
/**
* @file
* IMAP network mailbox
*
* @authors
* Copyright (C) 1996-1998,2012 Michael R. Elkins <me@mutt.org>
* Copyright (C) 1996-1999 Brandon Long <blong@fiction.net>
* Copyright (C) 1999-2009,2012,2017 Brendan Cully <brendan@kublai.com>
* Copyright (C) 2018 Richard Russon <rich@flatcap.org>
*
* @copyright... | vuln | Safe | C/C++ |
// SPDX-License-Identifier: GPL-2.0-only
/*
* (C) COPYRIGHT 2016 ARM Limited. All rights reserved.
* Author: Liviu Dudau <Liviu.Dudau@arm.com>
*
* ARM Mali DP plane manipulation routines.
*/
#include <linux/iommu.h>
#include <linux/platform_device.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>... | vuln | Vulnerable | C/C++ |
gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)
{
gdImagePtr dst;
int y;
/* allocate the requested size (could be only partially filled) */
if (src->trueColor) {
dst = gdImageCreateTrueColor(crop->width, crop->height);
if (dst == NULL) {
return NULL;
}
gdImageSaveAlpha(dst, 1);
} else {
... | vuln | Safe | Unknown |
void OpenSSL_add_all_ciphers(void)
{
#ifndef OPENSSL_NO_DES
EVP_add_cipher(EVP_des_cfb());
EVP_add_cipher(EVP_des_cfb1());
EVP_add_cipher(EVP_des_cfb8());
EVP_add_cipher(EVP_des_ede_cfb());
EVP_add_cipher(EVP_des_ede3_cfb());
EVP_add_cipher(EVP_des_ede3_cfb1());
EVP_add_cipher(EVP_des_ede3_cfb8());
EVP_add_c... | vuln | Safe | C/C++ |
private ManagedUser get(@Nullable String userName) {
checkUserName(userName);
UserDetails details = userService.loadUserByUsername(userName);
if (details == null) {
return null;
}
return (ManagedUser) details;
} | vuln | Safe | Java |
STATIC bool
S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
regnode ** node_p,
UV * code_point_p,
int * cp_count,
I32 * flagp,
const bool strict,
const U32 depth
)
{
/* This routine teases apart the various meanings of... | vuln | Safe | C/C++ |
bool AXTableCell::isRowHeaderCell() const {
const AtomicString& scope = getAttribute(scopeAttr);
return equalIgnoringCase(scope, "row") ||
equalIgnoringCase(scope, "rowgroup");
} | vuln | Vulnerable | C/C++ |
int __cil_resolve_ast_node_helper(struct cil_tree_node *node, uint32_t *finished, void *extra_args)
{
int rc = SEPOL_OK;
struct cil_args_resolve *args = extra_args;
enum cil_pass pass = args->pass;
struct cil_tree_node *block = args->block;
struct cil_tree_node *macro = args->macro;
struct cil_tree_node *optional... | vuln | Vulnerable | Unknown |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# Copyright 2015-2018 Antoni Boucher (antoyo) <bouanto@zoho.com>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the ter... | vuln | Safe | Python |
LogEntryBuilder withAuthentication(Authentication authentication) {
logEntry.with(PRINCIPAL_FIELD_NAME, authentication.getUser().principal());
logEntry.with(AUTHENTICATION_TYPE_FIELD_NAME, authentication.getAuthenticationType().toString());
if (authentication.isApiKey()) {
... | vuln | Vulnerable | Java |
static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
{
struct sock *sk = sock->sk;
struct sockaddr_l2 la;
int len, err = 0;
BT_DBG("sk %p", sk);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
memset(&la, 0, sizeof(la));
len = min_t(unsigned int, sizeo... | 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 | Vulnerable | Python |
function loadStockTestResultsTable(table, options) {
// Setup filters for the table
var filterTarget = options.filterTarget || '#filter-list-stocktests';
var filterKey = options.filterKey || options.name || 'stocktests';
var filters = loadTableFilters(filterKey);
var params = {
part: opt... | vuln | Vulnerable | JavaScript |
struct task_struct * __cpuinit fork_idle(int cpu)
{
struct task_struct *task;
struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL,
&init_struct_pid, 0);
if (!IS_ERR(task))
init_idle(task, cpu);
return task;
} | vuln | Vulnerable | C/C++ |
public static void initialize()
{
LiquidEthaneMethane = registerFluid("liquidethanemethane", 1200, 140, 90, false, "liquid_ethanemethane");
Helium3 = registerFluid("helium3", -1000, 1000, 0, true, "liquid_helium3");
Ethane = registerFluid("ethane", -1000, 1000, 0, true, "liquid_ethane");
HeliumHydrogen = re... | vuln | Safe | Java |
package com.salesmanager.shop.admin.controller.shipping;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils... | vuln | Safe | Java |
from typing import Dict, Iterable
def path_to_nested(dict_obj: Dict) -> Dict:
"""
Transform a dict with paths as keys into a nested
dict
>>> path_to_nested ({"a/b/c": "d", "a/e": "f"})
{"a": {"b": {"c": "d"}, "e": "f"}}
If 2 unconsistent values are detected, fails with ValueError:
>>> pat... | vuln | Vulnerable | Python |
def __post_init__(self, title: str) -> None: # type: ignore
reference = Reference.from_ref(title)
dedup_counter = 0
while reference.class_name in _existing_enums:
existing = _existing_enums[reference.class_name]
if self.values == existing.values:
break #... | vuln | Safe | Python |
package org.hl7.fhir.igtools.web;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
i... | vuln | Vulnerable | Java |
/**
* deps/ecc/math.js - Elliptic Curve Math
* Original Copyright (c) 2003-2005 Tom Wu.
* Modifications Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file.
*
* Ported from Tom Wu, which is ported from BouncyCastle
* Modified to reuse existing external NPM modules, restricted to the
* NIST//SECG/X9.62 prim... | vuln | Vulnerable | JavaScript |
PlatformFileForTransit GetFileHandleForProcess(base::PlatformFile handle,
base::ProcessHandle process,
bool close_source_handle) {
IPC::PlatformFileForTransit out_handle;
#if defined(OS_WIN)
DWORD options = DUPLICATE_SAME... | vuln | Vulnerable | C/C++ |
from collections import defaultdict
from datetime import datetime
from debts import settle
from flask import current_app, g
from flask_sqlalchemy import BaseQuery, SQLAlchemy
from itsdangerous import (
BadSignature,
SignatureExpired,
TimedJSONWebSignatureSerializer,
URLSafeSerializer,
)
import sqlalche... | vuln | Vulnerable | Python |
package com.salesmanager.shop.admin.controller.shipping;
import com.salesmanager.core.business.services.shipping.ShippingService;
import com.salesmanager.core.model.merchant.MerchantStore;
import com.salesmanager.core.model.system.IntegrationConfiguration;
import com.salesmanager.core.model.system.IntegrationModule;
i... | vuln | Vulnerable | Java |
static int input_init(void)
{
GKeyFile *config;
GError *err = NULL;
config = load_config_file(CONFIGDIR "/input.conf");
if (config) {
int idle_timeout;
gboolean uhid_enabled;
idle_timeout = g_key_file_get_integer(config, "General",
"IdleTimeout", &err);
if (!err) {
DBG("input.conf: IdleTimeout=%... | vuln | Vulnerable | Unknown |
/*
* . .o8 oooo
* .o8 "888 `888
* .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo
* 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P'
* 888 888 888 888 8... | vuln | Safe | JavaScript |
void BinaryUploadService::IsAuthorized(AuthorizationCallback callback) {
if (!timer_.IsRunning()) {
timer_.Start(FROM_HERE, base::TimeDelta::FromHours(24), this,
&BinaryUploadService::ResetAuthorizationData);
}
if (!can_upload_data_.has_value()) {
if (!pending_validate_data_upload_requ... | vuln | Safe | C/C++ |
static uint16_t nvme_write_zeros(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd,
NvmeRequest *req)
{
NvmeRwCmd *rw = (NvmeRwCmd *)cmd;
const uint8_t lba_index = NVME_ID_NS_FLBAS_INDEX(ns->id_ns.flbas);
const uint8_t data_shift = ns->id_ns.lbaf[lba_index].ds;
uint64_t slba = le64_to_cpu(rw->slba);
... | vuln | Safe | C/C++ |
static av_always_inline void mc_chroma_dir(VP9Context *s, vp9_mc_func(*mc)[2],
uint8_t *dst_u, uint8_t *dst_v,
ptrdiff_t dst_stride,
const uint8_t *ref_u,
... | vuln | Safe | C/C++ |
@Override
public boolean postGeneration(ConfiguredGenFeature<?> configuredGenFeature, IWorld world, BlockPos rootPos, Species species, Biome biome, int radius, List<BlockPos> endPoints, SafeChunkBounds safeBounds, BlockState initialDirtState, Float seasonValue, Float seasonFruitProductionFactor) {
if (endPoints.isEm... | vuln | Safe | Java |
private void handleStoryReaction(@NonNull SignalServiceContent content, @NonNull SignalServiceDataMessage message, @NonNull Recipient senderRecipient) throws StorageFailedException {
log(content.getTimestamp(), "Story reaction.");
if (!Stories.isFeatureAvailable()) {
warn(content.getTimestamp(), "Droppin... | vuln | Vulnerable | Java |
public boolean hasInvalidBuffers() {
for (Entry<RenderType, UploadableBufferHolder> entry : uploaded.entrySet())
if ((entry.getValue().isInvalid() || !entry.getValue().isAvailable()) && !queue.containsKey(entry.getKey()))
return true;
return false;
} | vuln | Vulnerable | Java |
static int dnxhd_find_frame_end(DNXHDParserContext *dctx,
const uint8_t *buf, int buf_size)
{
ParseContext *pc = &dctx->pc;
uint64_t state = pc->state64;
int pic_found = pc->frame_start_found;
int i = 0;
if (!pic_found) {
for (i = 0; i < buf_size; i++) {
... | vuln | Safe | C/C++ |
static int parse_interval(Interval *interval, int interval_count,
const char **buf, void *log_ctx)
{
char *intervalstr;
int ret;
*buf += strspn(*buf, SPACES);
if (!**buf)
return 0;
memset(interval, 0, sizeof(Interval));
interval->index = interval_count;
... | vuln | Safe | C/C++ |
static int s390_ipl_init(SysBusDevice *dev)
{
S390IPLState *ipl = S390_IPL(dev);
int kernel_size;
if (!ipl->kernel) {
int bios_size;
char *bios_filename;
if (bios_name == NULL) {
bios_name = ipl->firmware;
}
bios_filename = qemu_find_file(QEMU_FIL... | vuln | Vulnerable | C/C++ |
function extractProtocol(address, location) {
address = trimLeft(address);
location = location || {};
var match = protocolre.exec(address);
var protocol = match[1] ? match[1].toLowerCase() : '';
var rest = match[2] ? match[2] + match[3] : match[3];
var slashes = !!(match[2] && match[2].length >= 2);
if ... | vuln | Safe | JavaScript |
AXObjectInclusion AXLayoutObject::defaultObjectInclusion(
IgnoredReasons* ignoredReasons) const {
if (!m_layoutObject) {
if (ignoredReasons)
ignoredReasons->push_back(IgnoredReason(AXNotRendered));
return IgnoreObject;
}
if (m_layoutObject->style()->visibility() != EVisibility::kVisible) {
... | vuln | Vulnerable | C/C++ |
exports.killByPort = function (port) {
var processId = null
try {
processId = exec(`lsof -t -i:${port}`)
} catch (e) {
}
if (processId !== null) { // if exists kill
exec(`kill ${processId}`)
}
} | vuln | Vulnerable | JavaScript |
pimcore.helpers.grid.getTranslationColumnRenderer = function (value, metaData, record, rowIndex, colIndex, store) {
return t(value);
}; | vuln | Vulnerable | JavaScript |
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view;
if (convertView == null) {
view = LayoutInflater.from(activityRef.get()).inflate(R.layout.contacts_entry, parent, false);
view.setTag(new ContactsEntryCache(view));
} else {
view = convertView;
}
final Re... | vuln | Vulnerable | Java |
// Copyright (c) 2015-2021 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
// 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 | Go |
int ipmi_destroy_user(struct ipmi_user *user)
{
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
} | vuln | Safe | Unknown |
public void setSpawnedTimeOfDay(final int ticks) {
if (!getPDCLock()) return;
try {
for (int i = 0; i < 2; i++) {
try {
if (getPDC().has(main.namespaced_keys.spawnedTimeOfDay, PersistentDataType.INTEGER))
return;
... | vuln | Safe | Java |
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2020-2021 The Matrix.org Foundation C.I.C.
#
# 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
... | vuln | Safe | Python |
public int getAgeForSeasonalWorldGen(IWorld world, BlockPos pos, Float seasonValue) {
if (this.getSpecies() != null && this.getSpecies().testFlowerSeasonHold(seasonValue)) {
return 0;//Fruit is as the flower stage
}
return Math.min(world.getRandom().nextInt(6), 3);//Half the time the fruit is fully mature
} | vuln | Vulnerable | Java |
ImageLoader::ImageLoader(Element* element)
: m_element(element),
m_derefElementTimer(TaskRunnerHelper::get(TaskType::Networking,
element->document().frame()),
this,
&ImageLoader::timerFired),
m_hasPendi... | vuln | Safe | C/C++ |
static int pcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
PCMDecode *s = avctx->priv_data;
int c, n;
short *samples;
uint8_t *src, *src2[MAX_CHANNELS];
samples = data;
src = buf;
n= av_... | vuln | Vulnerable | C/C++ |
public long getInsertThrottleIntervalInMs() {
return (long)
this.parameterMap.getOrDefault(
INSERT_THROTTLE_INTERVAL_IN_MILLIS_MAP_KEY, INSERT_THROTTLE_INTERVAL_IN_MILLIS_DEFAULT);
} | vuln | Vulnerable | Java |
@Autowired
public void setConfigurableEnvironment(ConfigurableEnvironment env) {
Properties props = new Properties();
if(!StringUtils.hasText(dbPath)) {
props.setProperty("gameyfin.db", "%s/.gameyfin/db".formatted(firstLibraryPath));
}
if(!StringUtils.hasText(cachePath)... | vuln | Vulnerable | Java |
e_ews_connection_get_oal_detail (EEwsConnection *cnc,
const gchar *oal_id,
const gchar *oal_element,
const gchar *etag,
GCancellable *cancellable,
GAsyncReadyCallback callback,
... | vuln | Vulnerable | Unknown |
gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)
{
gdImagePtr dst;
if (src->trueColor) {
dst = gdImageCreateTrueColor(crop->width, crop->height);
gdImageSaveAlpha(dst, 1);
} else {
dst = gdImageCreate(crop->width, crop->height);
gdImagePaletteCopy(dst, src);
}
dst->transparent = src->transpare... | vuln | Vulnerable | C/C++ |
static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define SkipLinesOp 0x01
#define SetColorOp 0x02
#define SkipPixelsOp 0x03
#define ByteDataOp 0x05
#define RunDataOp 0x06
#define EOFOp 0x07
char
magick[12];
Image
*image;
int
opcode,
operand,
status;
... | vuln | Vulnerable | Unknown |
/* Copyright 2017 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 | Python |
// SPDX-License-Identifier: GPL-2.0
/*
* Core of Xen paravirt_ops implementation.
*
* This file contains the xen_paravirt_ops structure itself, and the
* implementations for:
* - privileged instructions
* - interrupt flags
* - segment operations
* - booting and setup
*
* Jeremy Fitzhardinge <jeremy@xensource.... | vuln | Vulnerable | Go |
const got = require('@/utils/got');
const cheerio = require('cheerio');
const iconv = require('iconv-lite');
const timezone = require('@/utils/timezone');
const { parseDate } = require('@/utils/parse-date');
const { isValidHost } = require('@/utils/valid-host');
module.exports = async (ctx) => {
const site = ctx.p... | vuln | Safe | JavaScript |
static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(in_skb->sk);
struct rtmsg *rtm;
struct nlattr *tb[RTA_MAX+1];
struct fib_result res = {};
struct rtable *rt = NULL;
struct flowi4 fl4;
__be32 dst = 0;
__be32 src = 0;
... | vuln | Safe | C/C++ |
static void gxf_read_index(AVFormatContext *s, int pkt_len) {
AVIOContext *pb = s->pb;
AVStream *st = s->streams[0];
uint32_t fields_per_map = avio_rl32(pb);
uint32_t map_cnt = avio_rl32(pb);
int i;
pkt_len -= 8;
if (s->flags & AVFMT_FLAG_IGNIDX) {
avio_skip(pb, pkt_len);
ret... | vuln | Vulnerable | C/C++ |
public void setTime(final FileTime time) {
this.mtime = TimeUtils.toUnixTime(time);
} | vuln | Safe | Java |
ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep)
ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
{
int totlen;
uint32_t t;
ND_TCHECK(p[0]);
if (p[0] & 0x80)
totlen = 4;
else {
ND_TCHECK_16BITS(&p[2]);
totlen = 4 + EXTRACT_16BITS(&p[2]);
}
if... | vuln | Safe | C/C++ |
/* rsa.c
*
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) a... | vuln | Safe | C/C++ |
@Override
public String determineTargetUrl(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) {
final URI resourceUri = RequestUriBuilder.fromHttpServletRequest(request).path(ROOT_PATH).build();
processAuthentication(response, authentication, r... | vuln | Safe | Java |
def __init__(self, master=None, value=None, name=None):
"""Construct a variable
MASTER can be given as master widget.
VALUE is an optional value (defaults to "")
NAME is an optional Tcl name (defaults to PY_VARnum).
If NAME matches an existing variable and VALUE is omitted
... | vuln | Safe | Python |
public float getValueAtCurrentTick(float currentValue) {
if(keyframes.isEnabled()) {
int pos = keyframes.findAtTick(currentTick);
KeyframeAnimation.KeyFrame keyBefore = findBefore(pos, currentValue);
if (isLoopStarted && keyBefore.tick < data.returnToTick) {
... | vuln | Vulnerable | Java |
@Override
public boolean useItem(UseItemParams params) {
params.player.getInventory().addItem(this.i); // TODO: Currently this returns false for all virtual items - need to have a proper success/fail
return true;
} | vuln | Vulnerable | Java |
static CACHE_BITMAP_V3_ORDER* update_read_cache_bitmap_v3_order(rdpUpdate* update, wStream* s,
UINT16 flags)
{
BOOL rc;
BYTE bitsPerPixelId;
BITMAP_DATA_EX* bitmapData;
UINT32 new_len;
BYTE* new_data;
CACHE_BITMAP_V3_ORDER* cache_bitmap_v3;
if (!up... | vuln | Safe | Unknown |
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* 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 r... | vuln | Vulnerable | C/C++ |
char *ogs_nas_5gs_suci_from_mobile_identity(
ogs_nas_5gs_mobile_identity_t *mobile_identity)
{
ogs_nas_5gs_mobile_identity_suci_t *mobile_identity_suci = NULL;
ogs_plmn_id_t plmn_id;
char tmp[OGS_MAX_IMSI_BCD_LEN+1];
char routing_indicator[5];
char *suci = NULL;
ogs_assert(mobile_identi... | vuln | Vulnerable | C/C++ |
int _sasl_add_string(char **out, size_t *alloclen,
size_t *outlen, const char *add)
{
size_t addlen;
if (add==NULL) add = "(null)";
addlen=strlen(add)+1; /* only compute once */
if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK)
return SASL_NOMEM;
strncpy(*out + *outlen, add, addlen);
*... | vuln | Safe | C/C++ |
public static void search() {
ClientWorld world = MinecraftClient.getInstance().world;
ClientPlayerEntity player = MinecraftClient.getInstance().player;
if (world == null || player == null) {
return;
}
ShapeDespawnSphere shapeDespawnSphere = getShapeDespawnSphere();
... | vuln | Safe | Java |
/*
* MinIO Cloud Storage, (C) 2016 MinIO, 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 la... | vuln | Vulnerable | Go |
@Override
public void perform(PlayerEntity attacker, Hand hand, ItemModularHandheld item, ItemStack itemStack, LivingEntity target, Vector3d hitVec, int chargedTicks) {
int armor = target.getTotalArmorValue();
boolean isPunctured = target.getActivePotionEffect(PuncturedPotionEffect.instance) != nul... | vuln | Vulnerable | Java |
void HeaderMapImpl::removePrefix(const LowerCaseString& prefix) {
headers_.remove_if([&](const HeaderEntryImpl& entry) {
bool to_remove = absl::StartsWith(entry.key().getStringView(), prefix.get());
if (to_remove) {
// If this header should be removed, make sure any references in the
// static loo... | vuln | Vulnerable | C/C++ |
static JSON_INLINE size_t num_buckets(hashtable_t *hashtable)
{
return primes[hashtable->num_buckets];
} | vuln | Vulnerable | C/C++ |
static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr,
int len, int flags)
{
struct sock *sk = sock->sk;
struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk);
struct sockaddr_nfc_llcp *addr = (struct sockaddr_nfc_llcp *)_addr;
struct nfc_dev *dev;
struct nfc_llcp_local *local;
int ret = ... | vuln | Safe | Unknown |
void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
unsigned long address, bool freeze, struct page *page)
{
spinlock_t *ptl;
struct mmu_notifier_range range;
mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, vma->vm_mm,
address & HPAGE_PMD_MASK,
(address & HPAGE_PMD_MASK) + HPAGE_PMD_SI... | vuln | Vulnerable | C/C++ |
'use strict';
const internals = {
operators: ['!', '^', '*', '/', '%', '+', '-', '<', '<=', '>', '>=', '==', '!=', '&&', '||', '??'],
operatorCharacters: ['!', '^', '*', '/', '%', '+', '-', '<', '=', '>', '&', '|', '?'],
operatorsOrder: [['^'], ['*', '/', '%'], ['+', '-'], ['<', '<=', '>', '>='], ['==', '!... | vuln | Vulnerable | Java |
static uint32_t fdctrl_read_data (fdctrl_t *fdctrl)
{
fdrive_t *cur_drv;
uint32_t retval = 0;
int pos, len;
cur_drv = get_cur_drv(fdctrl);
fdctrl->state &= ~FD_CTRL_SLEEP;
if (FD_STATE(fdctrl->data_state) == FD_STATE_CMD) {
FLOPPY_ERROR("can't read data in CMD state\n");
return 0... | vuln | Safe | C/C++ |
MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path)
{
char
cache_path[MaxTextExtent];
MagickBooleanType
status;
assert(path != (const char *) NULL);
status=MagickFalse;
(void) LogMagickEvent(ResourceEvent,GetMagickModule(),"Relinquish %s",path);
if (resource_semaphore == ... | vuln | Safe | 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 |
static void mtree_print_mr(fprintf_function mon_printf, void *f,
const MemoryRegion *mr, unsigned int level,
hwaddr base,
MemoryRegionListHead *alias_print_queue)
{
MemoryRegionList *new_ml, *ml, *next_ml;
MemoryRegionListHead subm... | vuln | Safe | C/C++ |
hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
target_ulong raddr;
int prot;
uint64_t asc = env->psw.mask & PSW_MASK_ASC;
if (!(env->psw.mask & PSW_MASK_64)) {
vaddr &= 0x7fffffff;
}
mmu_translate... | vuln | Vulnerable | C/C++ |
ikev2_n_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext,
u_int item_len, const u_char *ep,
uint32_t phase _U_, uint32_t doi _U_,
uint32_t proto _U_, int depth _U_)
{
const struct ikev2_n *p;
struct ikev2_n n;
const u_char *cp;
u_char showspi, showsomedata;
const char *notify_na... | vuln | Safe | C/C++ |
public Response get(final URL target, final QueryInput input,
final List<? extends Authentication> auth) throws IOException {
final var url = (input == null) ? buildTargetUrl(target, null)
: buildTargetUrl(target, input.getOptional());
return this.get(url, toArgs(... | vuln | Safe | Java |
private boolean validateWhenData() {
tWhen = whenBox.getSelectedIndex() + 1;
tWhenData = (Integer) whenDataSpinner.getValue(); // always int within range from JSpinner
tWhenString = "";
if ((tWhen == TransitSectionAction.SENSORACTIVE) || (tWhen == TransitSectionAction.SENSORINACTIVE)) {
... | vuln | Vulnerable | Java |
void NavigationRequest::OnStartChecksComplete(
NavigationThrottle::ThrottleCheckResult result) {
DCHECK(result.action() != NavigationThrottle::DEFER);
DCHECK(result.action() != NavigationThrottle::BLOCK_RESPONSE);
if (on_start_checks_complete_closure_)
on_start_checks_complete_closure_.Run();
if (resul... | vuln | Safe | C/C++ |
makeOperatorDependencies(HeapTuple tuple,
bool makeExtensionDep,
bool isUpdate)
{
Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tuple);
ObjectAddress myself,
referenced;
myself.classId = OperatorRelationId;
myself.objectId = oper->oid;
myself.objectSubId = 0;
/*
* If we are updating t... | vuln | Vulnerable | Unknown |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
const auto* params = reinterpret_cast<TfLiteBidirectionalSequenceRNNParams*>(
node->builtin_data);
// Check we have all the inputs and outputs we need.
TF_LITE_ENSURE_EQ(context, node->inputs->size, 12);
TF_LITE_ENSURE_EQ(context, node->out... | vuln | Vulnerable | C/C++ |
def _request(
self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey,
):
"""Do the actual request using the connection object
and also follow one level of redirects if necessary"""
auths = [(auth.depth(request_uri), auth) for auth in self.authoriz... | vuln | Safe | Python |
ProcShmCreatePixmap(client)
register ClientPtr client;
{
PixmapPtr pMap;
DrawablePtr pDraw;
DepthPtr pDepth;
register int i, rc;
ShmDescPtr shmdesc;
REQUEST(xShmCreatePixmapReq);
unsigned int width, height, depth;
unsigned long size;
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
... | vuln | Safe | Unknown |
static int get_cookies(HTTPContext *s, char **cookies, const char *path,
const char *domain)
{
int ret = 0;
char *next, *cookie, *set_cookies = av_strdup(s->cookies), *cset_cookies = set_cookies;
if (!set_cookies) return AVERROR(EINVAL);
*cookies = NULL;
while ((cook... | vuln | Safe | C/C++ |
CSSStyleSheet* CSSStyleSheet::CreateInline(Node& owner_node,
const KURL& base_url,
const TextPosition& start_position,
const WTF::TextEncoding& encoding) {
CSSParserContext* parser_contex... | vuln | Vulnerable | C/C++ |
static void setMediaVolume(Context context, AudioManager audioManager, int value) {
//PPApplication.logE("[TEST MEDIA VOLUME] ActivateProfileHelper.setMediaVolume", "value="+value);
// Fatal Exception: java.lang.SecurityException: Only SystemUI can disable the safe media volume:
// Neither user... | vuln | Safe | Java |
private function _categoriesminmax( $option ) {
if ( is_numeric( $option[0] ) ) {
$this->addWhere( intval( $option[0] ) . ' <= (SELECT count(*) FROM ' . $this->tableNames['categorylinks'] . ' WHERE ' . $this->tableNames['categorylinks'] . '.cl_from=page_id)' );
}
if ( isset( $option[1] ) && is_numeric( $optio... | vuln | Safe | PHP |
def wrapper(*args, **kwargs):
return sanitize(function(*args, **kwargs)) | vuln | Safe | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.