code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
@Override
protected void dump(FileDescriptor fd, PrintWriter printWriter, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, printWriter)) return;
IndentingPrintWriter pw = new IndentingPrintWriter(printWriter, " ");
pw.println("Current lock settings service state:");
... | vuln | Safe | Java |
export function writeConfig(output, key, value, recurse) {
if (!isLegalKey(key)) return;
var k, o;
if (isObject(value) && !isArray(value)) {
o = isObject(output[key]) ? output[key] : (output[key] = {});
for (k in value) {
if (recurse && (recurse === true || recurse[k])) {
writeConfig(o, k, ... | vuln | Safe | JavaScript |
void mayfly_enable(u8_t caller_id, u8_t callee_id, u8_t enable)
{
if (enable) {
if (mft[callee_id][caller_id].enable_req ==
mft[callee_id][caller_id].enable_ack) {
mft[callee_id][caller_id].enable_req++;
}
mayfly_enable_cb(caller_id, callee_id, enable);
} else {
if (mft[callee_id][caller_id].disable... | vuln | Vulnerable | C/C++ |
static <T> T fromJSON(String json, Class<T> clazz) throws Exception {
try {
return new ObjectMapper()
.setAnnotationIntrospector(new JacksonAnnotationIntrospector())
.readValue(json, clazz);
} catch (JsonParseException e) {
String errMsg = ... | vuln | Vulnerable | Java |
p11_kit_iter_next (P11KitIter *iter)
{
CK_ULONG batch;
CK_ULONG count;
CK_BBOOL matches;
CK_RV rv;
return_val_if_fail (iter->iterating, CKR_OPERATION_NOT_INITIALIZED);
COROUTINE_BEGIN (iter_next);
iter->object = 0;
if (iter->match_nothing)
return finish_iterating (iter, CKR_CANCEL);
if (!(iter->with_mod... | vuln | Safe | Unknown |
ssize_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read)
{
size_t offset = 0;
int err;
if (qemu_in_coroutine()) {
if (do_read) {
return qemu_co_recv(fd, buffer, size);
} else {
return qemu_co_send(fd, buffer, size);
}
}
while (offset < size... | vuln | Safe | C/C++ |
function showTooltip(pos, item, formater) {
var content = formater(item);
$('<div id="flot-tooltip">').text(content).css({
top: pos.pageY - 40,
left: pos.pageX -10,
'border-color': item.series.color
}).appendTo("body").zIndex(5000).show();
} | vuln | Safe | JavaScript |
type: new GraphQLNonNull(parseGraphQLSchema.viewerType),
async resolve(_source, _args, context, queryInfo) {
try {
return await getUserFromSessionToken(
context,
queryInfo,
'user.',
false
);
} catch (e) {
parseGraphQLSch... | vuln | Safe | JavaScript |
void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
if (prep_frame_view_)
return;
if (!render_view()->GetWebView())
return;
blink::WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
if (!main_frame)
return;
blink::WebDocument documen... | vuln | Vulnerable | C/C++ |
def local_media_thumbnail_rel(
self, media_id: str, width: int, height: int, content_type: str, method: str
) -> str:
top_level_type, sub_type = content_type.split("/")
file_name = "%i-%i-%s-%s-%s" % (width, height, top_level_type, sub_type, method)
return os.path.join(
"... | vuln | Vulnerable | Python |
/*
* GPAC - Multimedia Framework C SDK
*
* Authors: Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2000-2022
* All rights reserved
*
* This file is part of GPAC / ISO Media File Format sub-project
*
* GPAC is free software; you can redistribute it and/or modify
* it under the terms of the GNU L... | vuln | Safe | C/C++ |
static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
{
struct net *net = sock_net(skb->sk);
struct tcmsg *tcm = nlmsg_data(n);
struct nlattr *tca[TCA_MAX + 1];
struct net_device *dev;
u32 clid;
struct Qdisc *q = NULL;
struct Qdisc *p = NULL;
int err;
if ((n->nlmsg_type != RTM_GETQDISC) && !capable... | vuln | Vulnerable | Unknown |
void CL_Init( void ) {
Com_Printf( "----- Client Initialization -----\n" );
Con_Init();
if(!com_fullyInitialized)
{
CL_ClearState();
clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED
cl_oldGameSet = qfalse;
}
cls.realtime = 0;
CL_InitInput();
cl_noprint = Cvar_Get( "cl_noprint", "0", 0 );
#i... | vuln | Safe | C/C++ |
public PBEWithSHA1AESCBC192()
{
super(new CBCBlockCipher(new AESFastEngine()), PKCS12, SHA1, 192, 16);
} | vuln | Vulnerable | Java |
ULONG ntlm_av_pair_list_length(NTLM_AV_PAIR* pAvPairList, size_t cbAvPairList)
{
size_t size;
size_t cbAvPair;
NTLM_AV_PAIR* pAvPair;
pAvPair = ntlm_av_pair_get(pAvPairList, cbAvPairList, MsvAvEOL, &cbAvPair);
if (!pAvPair)
return 0;
size = ((PBYTE)pAvPair - (PBYTE)pAvPairList) + sizeof(NTLM_AV_PAIR);
WINPR_... | vuln | Safe | C/C++ |
target_ulong helper_srad(CPUPPCState *env, target_ulong value,
target_ulong shift)
{
int64_t ret;
if (likely(!(shift & 0x40))) {
if (likely((uint64_t)shift != 0)) {
shift &= 0x3f;
ret = (int64_t)value >> shift;
if (likely(ret >= 0 || (value & ... | vuln | Safe | C/C++ |
def start(self):
"""
Prepare the server to start serving connections.
Configure the server socket handler and establish a TLS wrapping
socket from which all client connections descend. Bind this TLS
socket to the specified network address for the server.
Raises:
... | vuln | Safe | Python |
/*
* 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 int latm_decode_audio_specific_config(struct LATMContext *latmctx,
GetBitContext *gb, int asclen)
{
AACContext *ac = &latmctx->aac_ctx;
AVCodecContext *avctx = ac->avctx;
MPEG4AudioConfig m4ac = {0};
int config_start_bit = get_bits_count(gb);
... | vuln | Vulnerable | C/C++ |
static Bool svg_parse_animation(GF_SVG_Parser *parser, GF_SceneGraph *sg, SVG_DeferredAnimation *anim, const char *nodeID, u32 force_type)
{
GF_FieldInfo info;
u32 tag;
u8 anim_value_type = 0;
if (!anim->animation_elt)
return GF_FALSE;
if (anim->resolve_stage==0) {
/* Stage 0: parsing the animation attribute ... | vuln | Vulnerable | C/C++ |
$parameter = strtolower( $parameter ); // Force lower case for ease of use.
if ( empty( $parameter ) || substr( $parameter, 0, 1 ) == '#' || ( $this->parameters->exists( $parameter ) && !$this->parameters->testRichness( $parameter ) ) ) {
continue;
}
if ( !$this->parameters->exists( $parameter ) ) {
$... | vuln | Safe | PHP |
private void handleNotificationClickAfterPanelCollapsed(
NotificationEntry entry,
ExpandableNotificationRow row,
PendingIntent intent,
boolean isActivityIntent,
boolean animate) {
String notificationKey = entry.getKey();
mLogger.logHandleClickA... | vuln | Vulnerable | Java |
static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt)
{
AVIOContext *pb = s->pb;
uint32_t frame_size;
int ret, first = 1;
if (avio_feof(pb))
return AVERROR_EOF;
if (av_get_packet(pb, pkt, 12) != 12)
return AVERROR(EIO);
while (!avio_feof(pb)) {
if (!first) {
... | vuln | Safe | C/C++ |
public static function scanFile($path){
$file=OC_Filesystem::getLocalFile($path);
if(!self::isMusic($path)){
return;
}
if(!self::$getID3){
self::$getID3=@new getID3();
self::$getID3->encoding='UTF-8';
}
$data=@self::$getID3->analyze($file);
getid3_lib::CopyTagsToComments($data);
if(!isset($data... | vuln | Vulnerable | PHP |
bqarr_in(PG_FUNCTION_ARGS)
{
char *buf = (char *) PG_GETARG_POINTER(0);
WORKSTATE state;
int32 i;
QUERYTYPE *query;
int32 commonlen;
ITEM *ptr;
NODE *tmp;
int32 pos = 0;
#ifdef BS_DEBUG
StringInfoData pbuf;
#endif
state.buf = buf;
state.state = WAITOPERAND;
state.count = 0;
state.num = 0;
s... | vuln | Vulnerable | C/C++ |
@Nullable
InputStream getBlobStream(final long blobHandle) throws IOException {
final LongHashMap<InputStream> blobStreams = this.blobStreams;
if (blobStreams != null) {
final InputStream stream = blobStreams.get(blobHandle);
if (stream != null) {
stream.reset... | vuln | Vulnerable | Java |
static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport;
wport = serial->port[1];
tty_port_tty_set(&wport->port, tty);
return usb_serial_generic_open(tty, port);
} | vuln | Vulnerable | C/C++ |
/*
* . .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 | Vulnerable | JavaScript |
load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
char immediate_load)
{
static const int intoffset[] = { 0, 4, 2, 1 };
static const int intjump[] = { 8, 8, 4, 2 };
int rc;
DATA32 *ptr;
GifFileType *gif;
GifRowType *r... | 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 bool indication_handler(struct restund_msgctx *ctx, int proto,
void *sock, const struct sa *src,
const struct sa *dst,
const struct stun_msg *msg)
{
struct stun_attr *data, *peer;
struct allocation *al;
struct perm *perm;
const struct sa *psa;
int err;
(void)sock;
(void)ctx;
... | vuln | Vulnerable | C/C++ |
/*
* jabberd - Jabber Open Source Server
* Copyright (c) 2002 Jeremie Miller, Thomas Muldowney,
* Ryan Eatmon, Robert Norris
*
* 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 Found... | vuln | Vulnerable | C/C++ |
def self.save_sync_new_version(config, nodes, cluster_name, fetch_on_conflict, tokens={})
if not cluster_name or cluster_name.empty?
# we run on a standalone host, no config syncing
config.version += 1
config.save()
return true, {}
else
# we run in a cluster so we need to sync the ... | vuln | Vulnerable | Ruby |
@Packet
public void onOut(WrappedOutTransaction packet) {
lastSentTrans.reset();
} | vuln | Vulnerable | Java |
ProcessIdToFilterMap* GetProcessIdToFilterMap() { | vuln | Safe | C/C++ |
void Compute(OpKernelContext* ctx) final {
// Extract inputs and validate shapes and types.
const CSRSparseMatrix* input_matrix;
OP_REQUIRES_OK(ctx, ExtractVariantFromInput(ctx, 0, &input_matrix));
const Tensor& input_permutation_indices = ctx->input(1);
int64 num_rows;
int batch_size;
Vali... | vuln | Vulnerable | C/C++ |
public List<ItemStack> getCandidates() {
return candidates == null ? Collections.emptyList() : Arrays.stream(this.candidates.get()).filter(info -> info.getBlockState().getBlock() != Blocks.AIR).map(info->{
IBlockState blockState = info.getBlockState();
MetaTileEntity metaTile... | vuln | Safe | Java |
void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode)
void nfs4_close_state(struct path *path, struct nfs4_state *state, fmode_t fmode)
{
__nfs4_close(path, state, fmode, 0);
} | vuln | Safe | C/C++ |
static NetSocketState *net_socket_fd_init_stream(VLANState *vlan,
const char *model,
const char *name,
int fd, int is_connected)
{
NetSocketState *s;
s = qemu_malloc... | vuln | Vulnerable | C/C++ |
/*
* Copyright (C) 2014-2018 Yubico AB - See COPYING
*/
#include "util.h"
#include <u2f-server.h>
#include <u2f-host.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <syslog.h>
#include <pwd.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
int get_devices_... | vuln | Vulnerable | C/C++ |
def get_release_file(root, request):
session = DBSession()
f = ReleaseFile.by_id(session, int(request.matchdict['file_id']))
rv = {'id': f.id,
'url': f.url,
'filename': f.filename,
}
f.downloads += 1
f.release.downloads += 1
f.release.package.downloads += 1
ses... | vuln | Vulnerable | Python |
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerText="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(t... | vuln | Safe | JavaScript |
@Override
protected boolean sendAuthDataRequest(ClientSession session, String service) throws Exception {
String name = getName();
boolean debugEnabled = log.isDebugEnabled();
if (requestPending.get()) {
if (debugEnabled) {
log.debug("sendAuthDataRequest({})[{}] n... | vuln | Safe | Java |
PHP_FUNCTION(dom_document_save_html_file)
{
zval *id;
xmlDoc *docp;
int file_len, bytes, format;
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
const char *encoding;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op", &id, dom_document_class_entry, &file, &file_len) == FAI... | vuln | Safe | Unknown |
void big_key_describe(const struct key *key, struct seq_file *m)
{
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_instantiated(key))
seq_printf(m, ": %zu [%s]",
datalen,
datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
} | vuln | Vulnerable | C/C++ |
int msix_init(struct PCIDevice *dev, unsigned short nentries,
MemoryRegion *table_bar, uint8_t table_bar_nr,
unsigned table_offset, MemoryRegion *pba_bar,
uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos)
{
int cap;
unsigned table_size, pba_size;
uint8_t *co... | vuln | Vulnerable | C/C++ |
public void render(Screen screen, int x, int y, boolean isSelected, String contain, int containColor) {
if (!visible) {
return;
}
render(screen, x, y, isSelected);
if (contain == null || contain.isEmpty()) {
return;
}
String string = toString().toLowerCase(Locale.ENGLISH);
contain = contain.toLowe... | vuln | Vulnerable | Java |
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 | Safe | C/C++ |
void NavigationObserver::PromptToEnableExtensionIfNecessary(
NavigationController* nav_controller) {
if (!in_progress_prompt_extension_id_.empty())
return;
NavigationEntry* nav_entry = nav_controller->GetVisibleEntry();
if (!nav_entry)
return;
const GURL& url = nav_entry->GetURL();
if (!url... | vuln | Safe | C/C++ |
private <T> void createEntry(DataParameter<T> parameter, T value) {
DataEntry<T> entry = new DataEntry<>(parameter, value);
this.entries.put(parameter.getId(), entry);
this.empty = false;
} | vuln | Safe | Java |
char *gf_seng_get_base64_iod(GF_SceneEngine *seng)
{
u32 size, size64;
u8 *buffer, *buf64;
u32 i=0;
GF_StreamContext*sc = NULL;
if (!seng->ctx->root_od) return NULL;
while ((sc = (GF_StreamContext*)gf_list_enum(seng->ctx->streams, &i))) {
if ((sc->streamType == GF_STREAM_SCENE) && (sc->codec_id != GF_CODECID_... | vuln | Safe | Unknown |
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state == null || !state.getClass().equals(SavedState.class)) {
// Didn't save state for us in onSaveInstanceState
super.onRestoreInstanceState(state);
return;
}
SavedState myState = (SavedState) state;
super.onRestoreInstanceStat... | vuln | Vulnerable | Java |
def get_available_providers_packages():
"""Get list of all available providers packages to build."""
return [provider["package-name"] for provider in ALL_PROVIDER_YAMLS] | vuln | Vulnerable | Python |
/*
===========================================================================
Copyright (C) 1999 - 2005, Id Software, Inc.
Copyright (C) 2000 - 2013, Raven Software, Inc.
Copyright (C) 2001 - 2013, Activision, Inc.
Copyright (C) 2005 - 2015, ioquake3 contributors
Copyright (C) 2013 - 2015, OpenJK contributors
This fi... | vuln | Vulnerable | C/C++ |
@Override
public void actionPerformed(@NonNull AnActionEvent e) {
TreeFileManagerFragment fragment =
(TreeFileManagerFragment) e.getRequiredData(CommonDataKeys.FRAGMENT);
TreeView<TreeFile> treeView = fragment.getTreeView();
TreeNode<TreeFile> currentNode = e.getRequiredData(... | vuln | Safe | Java |
'use strict';
/**
* Teedy application.
*/
angular.module('docs',
// Dependencies
['ui.router', 'ui.bootstrap', 'dialog', 'ngProgress', 'monospaced.qrcode', 'yaru22.angular-timeago', 'ui.validate',
'ui.sortable', 'restangular', 'ngSanitize', 'ngTouch', 'colorpicker.module', 'ngFileUpload', 'pascalprecht... | vuln | Vulnerable | Java |
int nghttp2_session_add_ping(nghttp2_session *session, uint8_t flags,
const uint8_t *opaque_data) {
int rv;
nghttp2_outbound_item *item;
nghttp2_frame *frame;
nghttp2_mem *mem;
mem = &session->mem;
if ((flags & NGHTTP2_FLAG_ACK) &&
session->obq_flood_counter_ >= NGHTTP2_... | vuln | Vulnerable | Unknown |
static INLINE BOOL update_read_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags)
{
if (fieldFlags & ORDER_FIELD_01)
{
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
Stream_Read_UINT8(s, brush->x);
}
if (fieldFlags & ORDER_FIELD_02)
{
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
Strea... | vuln | Safe | C/C++ |
def save(self, *args, **kwargs):
"""Provide better validation error."""
# Either 'attachment' or 'link' must be specified!
if not self.attachment and not self.link:
raise ValidationError({
'attachment': _('Missing file'),
'link': _('Missing external li... | vuln | Safe | Python |
xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
int ret;
if (input == NULL) return(-1);
if (xmlParserDebugEntities) {
if ((ctxt->input != NULL) && (ctxt->input->filename))
xmlGenericError(xmlGenericErrorContext,
"%s(%d): ", ctxt->input->filename,
ctxt->input->line);
xmlGen... | vuln | Vulnerable | Unknown |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | vuln | Vulnerable | Python |
PHP_METHOD(Phar, addEmptyDir)
{
char *dirname;
size_t dirname_len;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &dirname, &dirname_len) == FAILURE) {
return;
}
if (dirname_len >= sizeof(".phar")-1 && !memcmp(dirname, ".phar", sizeof(".phar")-1)) {
zend_throw_exception_ex(spl_ce_Ba... | vuln | Safe | Unknown |
def tcp_forward(self, host_port, device_port):
"""Starts tcp forwarding.
Args:
host_port: Port number to use on the computer.
device_port: Port number to use on the android device.
"""
self.forward('tcp:%d tcp:%d' % (host_port, device_port)) | vuln | Vulnerable | Python |
// 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 |
/*!
Copyright (c) REBUILD <https://getrebuild.com/> and/or its owners. All rights reserved.
rebuild is dual-licensed under commercial and open source licenses (GPLv3).
See LICENSE and COMMERCIAL in the project root for license information.
*/
package com.rebuild.web.general;
import cn.devezhao.commons.ObjectUtils;
i... | vuln | Safe | Java |
public function Verify_Final($name, $password, &$member = null)
{
if ($name == '' || $password == '') {
return false;
}
$m = $this->GetMemberByName($name);
if ($m->ID != null) {
if (hash_equals($m->Password, $password) === true) {
$member = $m;... | vuln | Safe | PHP |
private static void validateKeyOpsIsVerify(JsonObject jsonKey) throws IOException {
if (!jsonKey.has("key_ops")) {
return;
}
if (!jsonKey.get("key_ops").isJsonArray()) {
throw new IOException("key_ops is not an array");
}
JsonArray keyOps = jsonKey.get("key_ops").getAsJsonArray();
if... | vuln | Vulnerable | Java |
createBoard({ commit }, boardData) {
apiClient.createBoard(boardData)
.then((board) => {
commit('addBoard', board)
})
} | vuln | Vulnerable | JavaScript |
'use strict';
var request = require('request'),
cheerio = require('cheerio');
var shorthandProperties = {
"image": "image:url",
"video": "video:url",
"audio": "audio:url"
}
exports = module.exports = function(url, cb, options){
var userAgent = (options || {}).userAgent || 'NodeOpenGraphCrawler (https://githu... | vuln | Vulnerable | JavaScript |
public boolean verifyUserName(String userName, String password) {
if (!isAuth) {
return true;
}
AccountEntity accountEntity = accountRepository.findAllByUserNameAndDeleteAt(userName, IsDeleteEnum.NOT_DELETED.getCode());
if (null == accountEntity) {
return false;
... | vuln | Safe | Java |
static SSL_METHOD *ssl23_get_server_method(int ver)
{
#ifndef OPENSSL_NO_SSL2
if (ver == SSL2_VERSION)
return(SSLv2_server_method());
#endif
if (ver == SSL3_VERSION)
return(SSLv3_server_method());
else if (ver == TLS1_VERSION)
return(TLSv1_server_method());
else
return(NULL);
} | vuln | Vulnerable | Unknown |
void do_rfi (void)
{
env->nip = env->spr[SPR_SRR0] & ~0x00000003;
T0 = env->spr[SPR_SRR1] & ~0xFFFF0000UL;
do_store_msr(env, T0);
#if defined (DEBUG_OP)
dump_rfi();
#endif
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
} | vuln | Vulnerable | C/C++ |
TPM_RC tpm_kdfa(TSS2_SYS_CONTEXT *sapi_context, TPMI_ALG_HASH hashAlg,
TPM2B *key, char *label, TPM2B *contextU, TPM2B *contextV, UINT16 bits,
TPM2B_MAX_BUFFER *resultKey )
{
TPM2B_DIGEST tmpResult;
TPM2B_DIGEST tpm2bLabel, tpm2bBits, tpm2b_i_2;
UINT8 *tpm2bBitsPtr = &tpm2bBits.t.buffer[0];... | vuln | Vulnerable | C/C++ |
static apr_byte_t oidc_validate_post_logout_url(request_rec *r, const char *url,
char **err_str, char **err_desc) {
apr_uri_t uri;
const char *c_host = NULL;
if (apr_uri_parse(r->pool, url, &uri) != APR_SUCCESS) {
*err_str = apr_pstrdup(r->pool, "Malformed URL");
*err_desc = apr_psprintf(r->pool, "Logout URL ... | vuln | Vulnerable | C/C++ |
private void init(Player player) {
if (!SkillAPI.getSettings().isWorldEnabled(player.getWorld())) return;
PlayerData data = SkillAPI.getPlayerData(player);
if (data.getExtraData().has(ITEM_SAVE_KEY)) {
ItemStack[] items;
if (data.getExtraData().get(ITEM_SAVE_KEY) instanc... | vuln | Safe | Java |
/** @file
Clipsal CMR113 cent-a-meter power meter.
Copyright (C) 2021 Michael Neuling <mikey@neuling.org>
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 2 of the ... | vuln | Vulnerable | C/C++ |
ext2_xattr_set(struct inode *inode, int name_index, const char *name,
const void *value, size_t value_len, int flags)
{
struct super_block *sb = inode->i_sb;
struct buffer_head *bh = NULL;
struct ext2_xattr_header *header = NULL;
struct ext2_xattr_entry *here, *last;
size_t name_len, free, min_offs = sb->s... | vuln | Vulnerable | C/C++ |
CharArray(size_t len) {
buf = new char[len]();
} | vuln | Safe | C/C++ |
public static void init() {
try {
if (configPath.toFile().exists() && configPath.toFile().isFile()) {
root = parser.parse(Files.newBufferedReader(configPath)).getAsJsonObject();
if (root.has("seeds")) {
for (Map.Entry<String, JsonElement> element :... | vuln | Vulnerable | Java |
/*
* 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 |
void Phase2() final {
auto context = Deref(this->context);
Context::Scope context_scope{context};
auto name = GetKey(context);
auto object = GetTargetAndAlsoCheckForProxy();
// Delete key before transferring in, potentially freeing up some v8 heap
Unmaybe(object->Delete(context, name));
auto val_in... | vuln | Safe | C/C++ |
def additional_dynamic_validation(self, request: Request, req_pp_time: Optional[int]):
self._validate_request_type(request)
identifier, req_id, operation = get_request_data(request)
status = '*'
action = operation.get(ACTION)
# TODO: Some validation needed for making sure name an... | vuln | Safe | Python |
static av_cold int hevc_init_context(AVCodecContext *avctx)
{
HEVCContext *s = avctx->priv_data;
int i;
s->avctx = avctx;
s->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
if (!s->HEVClc)
goto fail;
s->HEVClcList[0] = s->HEVClc;
s->sList[0] = s;
s->cabac_state = av_malloc(HEVC_CO... | vuln | Vulnerable | C/C++ |
public void beforeScenario(Scenario scenario) {
long threadId = Thread.currentThread().getId();
TestExecutionContext testExecutionContext = Runner.getTestExecutionContext(threadId);
LOGGER.info(String.format("ThreadId : %s In RunCukes - Before: %s", threadId, scenario.getName()));
LOGGER... | vuln | Safe | Java |
function isPrototypePolluted(key) {
return /__proto__|constructor|prototype/.test(key);
} | vuln | Vulnerable | JavaScript |
long ParseElementHeader(IMkvReader* pReader, long long& pos,
long long stop, long long& id,
long long& size) {
if (stop >= 0 && pos >= stop)
return E_FILE_FORMAT_INVALID;
long len;
id = ReadID(pReader, pos, len);
if (id < 0)
return E_FILE_FORMAT_INVALID;
pos += len; // consume id
if (stop >= 0 && pos >... | vuln | Safe | C/C++ |
void ServerConnectionImpl::onResetStream(StreamResetReason reason) {
active_request_->response_encoder_.runResetCallbacks(reason);
connection_.dispatcher().deferredDelete(std::move(active_request_));
} | vuln | Vulnerable | Unknown |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
TF_LITE_ENSURE_... | vuln | Vulnerable | C/C++ |
_pickle_UnpicklerMemoProxy_copy_impl(UnpicklerMemoProxyObject *self)
/*[clinic end generated code: output=e12af7e9bc1e4c77 input=97769247ce032c1d]*/
{
size_t i;
PyObject *new_memo = PyDict_New();
if (new_memo == NULL)
return NULL;
for (i = 0; i < self->unpickler->memo_size; i++) {
int s... | vuln | Safe | Unknown |
static int matroska_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{
MatroskaDemuxContext *matroska = s->priv_data;
MatroskaTrack *tracks = matroska->tracks.elem;
AVStream *st = s->streams[stream_index];
int i, index, index_sub, index_min;
... | vuln | Vulnerable | C/C++ |
static int klsi_105_get_line_state(struct usb_serial_port *port,
unsigned long *line_state_p)
{
int rc;
u8 *status_buf;
__u16 status;
dev_info(&port->serial->dev->dev, "sending SIO Poll request\n");
status_buf = kmalloc(KLSI_STATUSBUF_LEN, GFP_KERNEL);
if (!status_buf)
return -ENOMEM;
status_buf[0] =... | vuln | Vulnerable | C/C++ |
public static DtlsConnectorConfig.Builder createDtlsConfig(ClientBaseConfig clientConfig) {
Configuration config = clientConfig.configuration;
int localPort = clientConfig.localPort == null ? 0 : clientConfig.localPort;
int extra = RecordLayer.IPV4_HEADER_LENGTH + 20 + Record.RECORD_HEADER_BYTES;
Integer c... | vuln | Safe | Java |
static void update_refcount_discard(BlockDriverState *bs,
uint64_t offset, uint64_t length)
{
BDRVQcowState *s = bs->opaque;
Qcow2DiscardRegion *d, *p, *next;
QTAILQ_FOREACH(d, &s->discards, next) {
uint64_t new_start = MIN(offset, d->offset);
uint64_t new... | vuln | Vulnerable | C/C++ |
void LinkResolver::resolve_handle_call(CallInfo& result, KlassHandle resolved_klass,
Symbol* method_name, Symbol* method_signature,
KlassHandle current_klass, bool check_access,
TRAPS) {
// JSR 292: t... | vuln | Safe | Unknown |
int remap_struct(unsigned int gtypes_nr[], unsigned int ftypes_nr[],
void *ps, unsigned int f_size, unsigned int g_size, size_t b_size)
{
int d;
size_t n;
/* Sanity check */
if (MAP_SIZE(ftypes_nr) > f_size)
return -1;
/* Remap [unsigned] long fields */
d = gtypes_nr[0] - ftypes_nr[0];
if (d) {
n = MINI... | vuln | Vulnerable | C/C++ |
void Compute(OpKernelContext* const context) override {
// node_id_range
const Tensor* node_id_range_t;
OP_REQUIRES_OK(context, context->input("node_id_range", &node_id_range_t));
const auto node_id_range = node_id_range_t->vec<int32>();
const int32_t node_id_first = node_id_range(0); // inclusive
... | vuln | Vulnerable | C/C++ |
GF_Err Media_CheckDataEntry(GF_MediaBox *mdia, u32 dataEntryIndex)
{
GF_DataEntryURLBox *entry;
GF_DataMap *map;
GF_Err e;
if (!mdia || !dataEntryIndex || dataEntryIndex > gf_list_count(mdia->information->dataInformation->dref->child_boxes)) return GF_BAD_PARAM;
entry = (GF_DataEntryURLBox*)gf_list_get(mdia->info... | vuln | Safe | C/C++ |
int ssl3_get_new_session_ticket(SSL *s)
{
int ok, al, ret = 0, ticklen;
long n;
const unsigned char *p;
unsigned char *d;
n = s->method->ssl_get_message(s,
SSL3_ST_CR_SESSION_TICKET_A,
SSL3_ST_CR_SESSION_TICKET_B,
... | vuln | Vulnerable | Unknown |
function La(e,t,n,r){var a,i=e._adapter,o=e.options,s=o.time,l=s.unit||Ma(s.minUnit,t,n,r),d=oa([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,c=t,h=[];if(u&&(c=+i.startOf(c,"isoWeek",u)),c=+i.startOf(c,u?"day":l),i.diff(n,t,l)>1e5*d)throw t+" and "+n+" are too far apart with stepSize of "+d+" "+l;for(a=c;a<... | vuln | Safe | JavaScript |
bool qemu_chr_fe_init(CharBackend *b, CharDriverState *s, Error **errp)
{
int tag = 0;
if (s->is_mux) {
tag = mux_chr_new_fe(s, b, errp);
if (tag < 0) {
return false;
}
} else {
s->be = b;
}
b->tag = tag;
b->chr = s;
return true;
} | vuln | Safe | Unknown |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.