code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
XdmcpGenerateKey (XdmAuthKeyPtr key)
#ifndef HAVE_ARC4RANDOM_BUF
static void
emulate_getrandom_buf (char *auth, int len)
{
long lowbits, highbits;
srandom ((int)getpid() ^ time((Time_t *)0));
highbits = random ();
highbits = random ();
getbits (lowbits, key->data);
getbits (highbits,... | vuln | Safe | C/C++ |
VOID ixheaacd_esbr_radix4bfly(const WORD32 *w, WORD32 *x, WORD32 index1,
WORD32 index) {
int i;
WORD32 l1, l2, h2, fft_jmp;
WORD64 xt0_0, yt0_0, xt1_0, yt1_0, xt2_0, yt2_0;
WORD64 xh0_0, xh1_0, xh20_0, xh21_0, xl0_0, xl1_0, xl20_0, xl21_0;
WORD32 x_0, x_1, x_l1_0, x_l1_1, x_... | vuln | Safe | C/C++ |
@Override
public String determineTargetUrl(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) {
final URI resourceUri = RequestUriBuilder.fromHttpServletRequest(request).build();
processAuthentication(response, authentication, resourceUri);
... | vuln | Vulnerable | Java |
int TLSInStream::pos()
{
return offset + ptr - start;
} | vuln | Vulnerable | C/C++ |
int bam_construct_seq(bam_seq_t **bp, size_t extra_len,
const char *qname, size_t qname_len,
int flag,
int rname, // Ref ID
int pos,
int end, // aligned start/end coords
int mapq,
uint32_t ncigar, const uint32_t *cigar,
int mrnm, // Mate ... | vuln | Vulnerable | C/C++ |
public void playGauntletAnimation() {
if (getUser() instanceof Player) {
if (gauntletStack != null && gauntletStack.getItem() == ItemHandler.EARTHBORE_GAUNTLET) {
Player player = (Player) getUser();
ItemHandler.EARTHBORE_GAUNTLET.playAnimation(player, gauntletStack, I... | vuln | Safe | Java |
/* Copyright 2018 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 |
package com.salesmanager.shop.admin.controller.merchant;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.annotation.Resource;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Htt... | vuln | Safe | Java |
/**
*
*/
package com.salesmanager.shop.admin.model.digital;
import com.salesmanager.core.model.catalog.product.Product;
import com.salesmanager.core.model.catalog.product.file.DigitalProduct;
import javax.validation.constraints.NotEmpty;
import org.springframework.web.multipart.MultipartFile;
import javax.validati... | vuln | Safe | Java |
static int pad_basic(bn_t m, int *p_len, int m_len, int k_len, int operation) {
uint8_t pad = 0;
int result = RLC_ERR;
bn_t t;
RLC_TRY {
bn_null(t);
bn_new(t);
switch (operation) {
case RSA_ENC:
case RSA_SIG:
case RSA_SIG_HASH:
/* EB = 00 | FF | D. */
bn_zero(m);
bn_lsh(m, m, 8);
bn... | vuln | Safe | C/C++ |
bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
DCHECK(!options.executable);
DCHECK(!mapped_file_);
if (options.size == 0)
return false;
uint32 rounded_size = (options.size + 0xffff) & ~0xffff;
if (rounded_size < options.size)
return false;
name_ = ASCIIToWide(options.name =... | vuln | Safe | C/C++ |
static bool reconstruct_chained_fixup(struct MACH0_(obj_t) *bin) {
if (!bin->dyld_info) {
return false;
}
if (!bin->nsegs) {
return false;
}
bin->chained_starts = R_NEWS0 (struct r_dyld_chained_starts_in_segment *, bin->nsegs);
if (!bin->chained_starts) {
return false;
}
size_t wordsize = get_word_size (b... | vuln | Vulnerable | Unknown |
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
int ts_start, int duration, int raw)
{
AVBPrint buf;
int ret, dlen;
AVSubtitleRect **rects;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
if ((ret = ff_ass_bprint_dialog(&buf, dialog, ts_start, duration, raw)) < 0)
... | vuln | Vulnerable | C/C++ |
# Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | vuln | Safe | Python |
private String getConnectionGroupKsmConfig(
UserContext userContext, Connectable connectable) throws GuacamoleException {
// Check to make sure it's a usable type before proceeding
if (
!(connectable instanceof Connection)
&& !(connectable instanceof Connecti... | vuln | Safe | Java |
GF_EXPORT
GF_Err gf_isom_fragment_add_sample_ex(GF_ISOFile *movie, GF_ISOTrackID TrackID, const GF_ISOSample *sample, u32 DescIndex,
u32 Duration, u8 PaddingBits, u16 DegradationPriority, Bool redundant_coding, void **ref, u32 ref_offset)
{
u32 count, buffer_size;
u8 *buffer;
u64 p... | vuln | Safe | C/C++ |
@Override
public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
loadSavedData(savedInstanceState, "onCreate");
}
activity = (AppCompatActivity) getActivity();
... | vuln | Safe | Java |
uint64_t qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num)
{
BDRVQcowState *s = bs->opaque;
int l1_index, l2_index;
uint64_t l2_offset, *l2_table, cluster_offset;
int l1_bits, c;
int index_in_cluster, nb_available, nb_needed, nb_clusters;
index_in_cluster = (offset >>... | vuln | Vulnerable | C/C++ |
static int
wb_prep(netdissect_options *ndo,
const struct pkt_prep *prep, u_int len)
{
int n;
const struct pgstate *ps;
const u_char *ep = ndo->ndo_snapend;
ND_PRINT((ndo, " wb-prep:"));
if (len < sizeof(*prep) || !ND_TTEST(*prep))
return (-1);
n = EXTRACT_32BITS(&prep->pp_n);
ps = (const struct pgstat... | vuln | Safe | C/C++ |
void SFS_Expression(ScriptParser *parser)
{
u32 val = gf_bs_read_int(parser->bs, NUMBITS_EXPR_TYPE);
if (parser->codec->LastError) return;
switch(val) {
case ET_CURVED_EXPR:
SFS_AddString(parser, "(");
SFS_CompoundExpression(parser);
SFS_AddString(parser, ")");
break;
case ET_NEGATIVE:
SFS_AddString(par... | vuln | Vulnerable | C/C++ |
/*
* Copyright 2002-2022 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | vuln | Safe | Java |
int append_camera_metadata(camera_metadata_t *dst,
const camera_metadata_t *src) {
if (dst == NULL || src == NULL ) return ERROR;
if (dst->entry_capacity < src->entry_count + dst->entry_count) return ERROR;
if (dst->data_capacity < src->data_count + dst->data_count) return ERROR;
memcpy... | vuln | Vulnerable | C/C++ |
static MagickBooleanType ClonePixelCacheRepository(
CacheInfo *restrict clone_info,CacheInfo *restrict cache_info,
ExceptionInfo *exception)
{
#define MaxCacheThreads 2
#define cache_threads(source,destination,chunk) \
num_threads((chunk) < (16*GetMagickResourceLimit(ThreadResource)) ? 1 : \
GetMagickResourc... | vuln | Vulnerable | C/C++ |
(function(window, factory) {
if(!window) {return;}
var globalInstall = function(){
factory(window.lazySizes);
window.removeEventListener('lazyunveilread', globalInstall, true);
};
factory = factory.bind(null, window, window.document);
if(typeof module == 'object' && module.exports){
factory(require('lazysi... | vuln | Safe | JavaScript |
/* FTP engine
*
* Copyright (c) 2014-2019 Joachim Nilsson <troglobit@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTW... | vuln | Vulnerable | C/C++ |
static int snd_timer_start_slave(struct snd_timer_instance *timeri)
{
unsigned long flags;
spin_lock_irqsave(&slave_active_lock, flags);
timeri->flags |= SNDRV_TIMER_IFLG_RUNNING;
if (timeri->master)
list_add_tail(&timeri->active_list,
&timeri->master->slave_active_head);
spin_unlock_irqrestore(&slave_... | vuln | Vulnerable | C/C++ |
ecma_op_internal_buffer_append (ecma_collection_t *container_p, /**< internal container pointer */
ecma_value_t key_arg, /**< key argument */
ecma_value_t value_arg, /**< value argument */
lit_magic_string_id_t lit_id) /**< ... | vuln | Safe | Unknown |
@Override
@NonNull
public Object instantiateItem (@NonNull ViewGroup container, int position) {
ViewController<?> c = prepareViewController(reversePosition(position));
container.addView(c.get());
if ((position == parent.currentPosition || (parent.currentPositionOffset != 0f && position == pare... | vuln | Safe | Java |
const wchar_t* GetIntegrityLevelString(IntegrityLevel integrity_level) {
switch (integrity_level) {
case INTEGRITY_LEVEL_SYSTEM:
return L"S-1-16-16384";
case INTEGRITY_LEVEL_HIGH:
return L"S-1-16-12288";
case INTEGRITY_LEVEL_MEDIUM:
return L"S-1-16-8192";
case INTEGRITY_LEVEL_MEDIUM_... | vuln | Safe | C/C++ |
/*
* Copyright (c) 2014 Open Grid Computing, Inc. All rights reserved.
* Copyright (c) 2005-2006 Network Appliance, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Vers... | vuln | Vulnerable | C/C++ |
@Override
public Collection<?> resolve(String groupId, String artifactId, String version, String packaging, String classifier,
Collection<String> scopes, int depth, Collection<MavenArtifactRepositoryReference> additionalRepositories,
Object session) throws DependencyResolutionException {
... | vuln | Safe | Java |
public static void finish(List<FerriteConfig.Option> options) throws IOException {
Path config = Paths.get("config", Constants.MODID + ".mixin.properties");
if (!Files.exists(config))
Files.createFile(config);
Properties propsInFile = new Properties();
propsInFile.load(Files.... | vuln | Vulnerable | Java |
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
import "syscall"
const (
B1000000 ... | vuln | Safe | Go |
private static void moveWorlds(File worldcontainerFile) {
for (File file : worldcontainerFile.listFiles())
try {
File destinationFile = new File(Paths.get(Bukkit.getWorldContainer().getCanonicalPath() + "/" + file.getName()).normalize().toString());
if (destinationFil... | vuln | Safe | Java |
bool Cues::LoadCuePoint() const {
const long long stop = m_start + m_size;
if (m_pos >= stop)
return false; // nothing else to do
Init();
IMkvReader* const pReader = m_pSegment->m_pReader;
while (m_pos < stop) {
const long long idpos = m_pos;
long len;
const long long id = ReadU... | vuln | Vulnerable | C/C++ |
private void notifyTrackPointsTableUpdate(boolean updateSamplingState, Set<TrackDataListener> sampledInListeners, Set<TrackDataListener> sampledOutListeners) {
if (sampledInListeners.isEmpty() && sampledOutListeners.isEmpty()) {
return;
}
if (updateSamplingState && numLoadedPoints >... | vuln | Vulnerable | Java |
int dsdb_user_obj_set_primary_group_id(struct ldb_context *ldb, struct ldb_message *usr_obj,
uint32_t user_account_control, uint32_t *group_rid_p)
{
int ret;
uint32_t rid;
struct ldb_message_element *el;
rid = ds_uf2prim_group_rid(user_account_control);
ret = samdb_msg_add_uint(ldb, usr_obj, usr_obj,
... | vuln | Vulnerable | Unknown |
var confirm = function(ndx) {
var last = ndx == exists.length-1,
opts = {
title : fm.i18n('cmdupload'),
text : ['errExists', exists[ndx].name, 'confirmRepl'],
all : !last,
accept : {
label : 'btnYes',
callback : function(all) {
!last && !all
... | vuln | Safe | JavaScript |
api.add = async function(req, res) {
const { commentForm, slackNotificationForm } = req.body;
const { validationResult } = require('express-validator');
const errors = validationResult(req.body);
if (!errors.isEmpty()) {
return res.json(ApiResponse.error('コメントを入力してください。'));
}
const pageI... | vuln | Safe | JavaScript |
void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags)
{
int i, shift, sp1, sp2, sp3, sp4;
const int32_t *src;
int32_t *dst;
int tmp[64];
int t0, t1, t2, t3, t4, t5, t6, t7, t8;
#define COMPENSATE(x) (x)
... | vuln | Vulnerable | C/C++ |
static ssize_t _hostfs_writev(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
void* buf = NULL;
size_t buf_size = 0;
size_t data_size = 0;
if (!file || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_E... | vuln | Safe | Unknown |
static int ea_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
EaDemuxContext *ea = s->priv_data;
AVStream *st;
if (!process_ea_header(s))
return AVERROR(EIO);
if (ea->video_codec) {
st = av_new_stream(s, 0);
if (!st)
return... | vuln | Safe | C/C++ |
ext2_xattr_put_super(struct super_block *sb) | vuln | Safe | C/C++ |
@Nonnull
@Override
public LogsQueryResult stepLog(@Nonnull String jobFullName, @Nonnull int runNumber, @Nonnull String flowNodeId, @Nonnull String traceId, @Nonnull String spanId, boolean complete) {
Span span = tracer.spanBuilder("ElasticsearchLogStorageRetriever.stepLog").startSpan();
final C... | vuln | Safe | Java |
static void write_object_file_prepare(const struct git_hash_algo *algo,
const void *buf, size_t len,
enum object_type type, struct object_id *oid,
char *hdr, size_t *hdrlen)
{
git_hash_ctx c;
/* Generate the header */
*hdrlen = format_object_header(hdr, *hdrlen, type, len);
/* Sha1..... | vuln | Safe | C/C++ |
static PyArray_Descr *
_try_convert_from_ctypes_type(PyTypeObject *type)
{
PyObject *_numpy_dtype_ctypes;
PyObject *res;
if (!npy_ctypes_check(type)) {
Py_INCREF(Py_NotImplemented);
return (PyArray_Descr *)Py_NotImplemented;
}
/* Call the python function of the same name. */
_n... | vuln | Safe | C/C++ |
"""Domain related views."""
from functools import reduce
from reversion import revisions as reversion
from django.contrib.auth import mixins as auth_mixins
from django.contrib.auth.decorators import (
login_required, permission_required, user_passes_test
)
from django.db.models import Q, Sum
from django.http imp... | vuln | Safe | Python |
private I2PSocket outproxyConnect(I2PSOCKSTunnel tun, String proxy) throws IOException, I2PException {
Properties overrides = new Properties();
overrides.setProperty("option.i2p.streaming.connectDelay", "200");
I2PSocketOptions proxyOpts = tun.buildOptions(overrides);
Destination dest = ... | vuln | Vulnerable | Java |
static void filter(FSPPContext *p, uint8_t *dst, uint8_t *src,
int dst_stride, int src_stride,
int width, int height,
uint8_t *qp_store, int qp_stride, int is_luma)
{
int x, x0, y, es, qy, t;
const int stride = is_luma ? p->temp_stride : (width + 16);
... | vuln | Vulnerable | C/C++ |
#ifndef JSI_LITE_ONLY
#ifndef JSI_AMALGAMATION
#include "jsiInt.h"
#endif
// SCOPESTRS
Jsi_ScopeStrs *jsi_ScopeStrsNew()
{
Jsi_ScopeStrs *ret = (Jsi_ScopeStrs *)Jsi_Calloc(1, sizeof(*ret));
return ret;
}
void jsi_ScopeStrsFree(Jsi_Interp *interp, Jsi_ScopeStrs *ss)
{
if (!ss) return;
int i;
for (... | vuln | Vulnerable | C/C++ |
/*
Copyright 2020 The Kubernetes 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 in writing, softwar... | vuln | Vulnerable | Java |
static int sanitize_ptr_alu(struct bpf_verifier_env *env,
struct bpf_insn *insn,
const struct bpf_reg_state *ptr_reg,
struct bpf_reg_state *dst_reg,
bool off_is_neg)
{
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = p... | vuln | Vulnerable | C/C++ |
def requires_access_decorator(func: T):
@wraps(func)
def decorated(*args, **kwargs):
__tracebackhide__ = True # Hide from pytest traceback.
appbuilder = current_app.appbuilder
dag_id_kwargs = kwargs.get("dag_id")
dag_id_args = request.args.get("dag_id")... | vuln | Safe | Python |
/* Unicorn Emulator Engine */
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
/* Modified for Unicorn Engine by Chen Huitao<chenhuitao@hfmrit.com>, 2020 */
#if defined(UNICORN_HAS_OSXKERNEL)
#include <libkern/libkern.h>
#else
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#endif
#include <time.h> // na... | vuln | Safe | C/C++ |
int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset,
int n_start, int n_end, int *num, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret, sectors;
uint64_t *l2_table;
unsigned int nb_clusters, keep_clusters;
uint64_t cluster_offset;
trace_qcow2_alloc_clusters... | vuln | Vulnerable | C/C++ |
@SuppressWarnings ("SuspiciousNameCombination")
private void setBigPhoto (int maxWidth, int topY, int bottomY) {
isImageBig = true;
int maxHeight = parent.getSmallestMaxContentHeight();
int contentWidth, contentHeight;
if (webPage.sticker != null && (Math.max(webPage.sticker.width, webPage.sticker.h... | vuln | Safe | Java |
public function print_section_subnets_table($User, $sectionId, $showSupernetOnly = false) {
$html = array();
# create csrf token
$csrf_ffss = $User->Crypto->csrf_cookie ("create-if-not-exists", "find_free_section_subnets");
# set custom fields
$Tools = new Tools ($this->Database);
$custom = $Tools->fetch_... | vuln | Safe | PHP |
public static final String getSvgXml(Document document) throws HopException {
try {
DOMSource domSource = new DOMSource(document);
StringWriter stringWriter = new StringWriter();
StreamResult streamResult = new StreamResult(stringWriter);
TransformerFactory transformerFactory = TransformerFa... | vuln | Vulnerable | Java |
private synchronized void connect() {
if (client == null) {
try {
client = new MqttClient(broker, clientId, new MemoryPersistence());
client.setCallback(this);
} catch (MqttException ex) {
LOGGER.error("Failed to connect to broker: {}", bro... | vuln | Vulnerable | Java |
static char *dmi_memory_device_size_str(u16 code)
{
static char size[16];
if (code == 0)
strcpy(size, "Empty");
else if (code == 0xFFFF)
strcpy(size, "Unknown");
else
{
if (code & 0x8000)
sprintf(size, "%u kB", code & 0x7FFF);
else
sprintf(size, "%u MB", code);
}
return size;
} | vuln | Safe | C/C++ |
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUnclaimed(ClaimDeletedEvent event) {
if (!deleteOnUnClaim) {
return;
}
Claim claim = event.getClaim();
if (event.getClaim().getOwnerID() == null) {
return;
}
... | vuln | Safe | Java |
'use strict'
const bindings = require('bindings')('ced.node')
module.exports = buf => {
if (!Buffer.isBuffer(buf)) {
throw new TypeError('Expected a buffer')
}
return bindings.detectEncoding(buf)
}
| vuln | Safe | C/C++ |
void MainWindow::showUpgradePrompt()
{
if (Settings.checkUpgradeAutomatic()) {
showStatusMessage("Checking for upgrade...");
QNetworkRequest request(QUrl("https://check.shotcut.org/version.json"));
QSslConfiguration sslConfig = request.sslConfiguration();
sslConfig.setPeerVerifyMode(... | vuln | Vulnerable | C/C++ |
_Unpickler_MemoGet(UnpicklerObject *self, size_t idx)
{
if (idx >= self->memo_size)
return NULL;
return self->memo[idx];
} | vuln | Safe | C/C++ |
bool smbXcli_session_is_guest(struct smbXcli_session *session)
{
if (session == NULL) {
return false;
}
if (session->conn == NULL) {
return false;
}
if (session->conn->mandatory_signing) {
return false;
}
if (session->conn->protocol >= PROTOCOL_SMB2_02) {
if (session->smb2->session_flags & SMB2_SESSIO... | vuln | Safe | Unknown |
public void openFile(@NonNull Context context, File file, Consumer<FileEditor> callback) {
FileEditor[] fileEditors = openFile(file, true);
if (fileEditors.length == 0) {
return;
}
if (fileEditors.length > 1) {
CharSequence[] items = Arrays.stream(fileEditors)
... | vuln | Safe | Java |
/* p_mach.cpp -- pack Mach Object executable
This file is part of the UPX executable compressor.
Copyright (C) 2004-2021 John Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
publ... | vuln | Vulnerable | C/C++ |
static int em_ret_far(struct x86_emulate_ctxt *ctxt)
{
int rc;
unsigned long eip, cs;
u16 old_cs;
int cpl = ctxt->ops->cpl(ctxt);
struct desc_struct old_desc, new_desc;
const struct x86_emulate_ops *ops = ctxt->ops;
if (ctxt->mode == X86EMUL_MODE_PROT64)
ops->get_segment(ctxt, &old_cs, &old_desc, NULL,
V... | vuln | Vulnerable | C/C++ |
PPC_OP(setlr)
{
regs->lr = (uint32_t)PARAM1;
RETURN();
} | vuln | Safe | C/C++ |
int ssl3_send_client_key_exchange(SSL *s)
{
unsigned char *p, *d;
int n;
unsigned long alg_k;
#ifndef OPENSSL_NO_RSA
unsigned char *q;
EVP_PKEY *pkey = NULL;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifndef OPENSSL_NO_ECDH
EC_KEY... | vuln | Safe | Unknown |
void
push_symbol(Str str, char symbol, int width, int n)
{
char buf[2], *p;
int i;
#ifdef USE_M17N
if (width == 2)
p = alt2_symbol[(unsigned char)symbol % N_SYMBOL];
else
#endif
p = alt_symbol[(unsigned char)symbol % N_SYMBOL];
for (i = 0; i < 2 && *p; i++, p++)
buf[i] = (*p == ' ') ? NBSP_CODE ... | vuln | Safe | C/C++ |
void WebContentsImpl::RunJavaScriptDialog(RenderFrameHost* render_frame_host,
const base::string16& message,
const base::string16& default_prompt,
const GURL& frame_url,
... | vuln | Vulnerable | C/C++ |
int URI_FUNC(ComposeQueryEngine)(URI_CHAR * dest,
const URI_TYPE(QueryList) * queryList,
int maxChars, int * charsWritten, int * charsRequired,
UriBool spaceToPlus, UriBool normalizeBreaks) {
UriBool firstItem = URI_TRUE;
int ampersandLen = 0; /* increased to 1 from second item on */
URI_CHAR * write = dest;
... | vuln | Vulnerable | C/C++ |
static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (thread_count <= 1) {
avctx->active_thread_type = 0;
return 0;
}
avctx->t... | vuln | Safe | C/C++ |
def get(self, arg,word=None):
try:
limit = self.get_argument("limit")
word = self.get_argument("word")
callback = sanitize_callback(self.get_argument("callback"))
result = rtxcomplete.prefix(word,limit)
result = callback+"("+json.dumps(re... | vuln | Safe | Python |
@Override
public boolean mayObservePackage(String packageName) {
PackageManager pm = mContext.getPackageManager();
try {
// A package is a module if this is non-null
if (pm.getModuleInfo(packageName, 0) != null) {
return true;
... | vuln | Safe | Java |
function updateCommandCategorieInDB(){
global $pearDB;
$DBRESULT = $pearDB->query("UPDATE `command_categories` SET `category_name` = '".$_POST["category_name"]."' , `category_alias` = '".$_POST["category_alias"]."' , `category_order` = '".$_POST["category_order"]."' WHERE `cmd_category_id` = '".$_POST["cmd_categ... | vuln | Vulnerable | PHP |
private void changeSettingsDialog(final FontData font) {
TextField nameField = new TextField(font.getName(), getSkin());
var scalingField = new TextField(Integer.toString(font.getScaling()), skin);
final var markupCheckBox = new CheckBox("markupEnabled", skin);
markupCheckBox.setChecked(... | vuln | Vulnerable | Java |
int
cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
{
size_t maxcount;
const cdf_summary_info_header_t *si =
CAST(const cdf_summary_info_header_t *, sst->sst_tab);
const cdf_section_declaration_t *sd =
CA... | vuln | Safe | C/C++ |
// +build go1.10
package net
import (
"errors"
"fmt"
"path/filepath"
"runtime"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netns"
)
var ErrLinkNotFound = errors.New("Link not found")
func WithNetNS(ns netns.NsHandle, work func() error) error {
runtime.LockOSThread()
defer runtime.UnlockOSThrea... | vuln | Safe | Go |
l2tp_framing_type_print(netdissect_options *ndo, const u_char *dat)
{
const uint32_t *ptr = (const uint32_t *)dat;
if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_ASYNC_MASK) {
ND_PRINT((ndo, "A"));
}
if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_SYNC_MASK) {
ND_PRINT((ndo, "S"));
}
} | vuln | Vulnerable | C/C++ |
static int set_sample_rate_v1(struct snd_usb_audio *chip, int iface,
struct usb_host_interface *alts,
struct audioformat *fmt, int rate)
{
struct usb_device *dev = chip->dev;
unsigned int ep;
unsigned char data[3];
int err, crate;
ep = get_endpoint(alts, 0)->bEndpointAddress;
/* if endpoint do... | vuln | Vulnerable | Unknown |
private void initModelFields(Token token, MerkleToken immutableToken) {
token.initTotalSupply(immutableToken.totalSupply());
token.initSupplyConstraints(immutableToken.supplyType(), immutableToken.maxSupply());
token.setKycKey(immutableToken.getKycKey());
token.setFreezeKey(immutableToken.getFreezeKey());
tok... | vuln | Safe | Java |
void recovery_cipher_init(bool passphrase_protection, bool pin_protection,
const char *language, const char *label, bool _enforce_wordlist,
uint32_t _auto_lock_delay_ms, uint32_t _u2f_counter, bool _dry_run)
{
enforce_wordlist = _enforce_wordlist;
dry_run = _d... | vuln | Safe | Unknown |
private void draw(final GLAutoDrawable drawable, float dx) {
GL2 gl = drawable.getGL().getGL2();
GLU glu = new GLU();
float[] color = new float[3];
gl.glEnable(GL.GL_MULTISAMPLE);
convertColor(p.getSunlight(), color);
float amb = (float) p.getAmbiance();
float dif = 1.0f - amb;
float spc = 1.0f;
gl... | vuln | Vulnerable | Java |
int ff_jpeg2000_init_component(Jpeg2000Component *comp,
Jpeg2000CodingStyle *codsty,
Jpeg2000QuantStyle *qntsty,
int cbps, int dx, int dy,
AVCodecContext *avctx)
{
int reslevelno, bandno, gban... | vuln | Safe | C/C++ |
static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
{
CompandContext *s = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
const int channels = inlink->channels;
const int nb_samples = frame->nb_samples;
AVFrame *out_frame;
int chan, i;
if (av_frame_is_writable(frame)) {
... | vuln | Vulnerable | C/C++ |
_bson_iter_next_internal (bson_iter_t *iter, /* INOUT */
const char **key, /* OUT */
uint32_t *bson_type, /* OUT */
bool *unsupported) /* OUT */
{
const uint8_t *data;
uint32_t o;
unsigned int len;
BSON_ASSERT (iter);
... | vuln | Vulnerable | Unknown |
static int set_string_number(void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
{
int ret = 0;
int num, den;
char c;
if (sscanf(val, "%d%*1[:/]%d%c", &num, &den, &c) == 2) {
if ((ret = write_number(obj, o, dst, 1, den, num)) >= 0)
return ret;
ret = 0;... | vuln | Vulnerable | C/C++ |
static void quiesce_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCLPEventClass *k = SCLP_EVENT_CLASS(klass);
dc->reset = quiesce_reset;
dc->vmsd = &vmstate_sclpquiesce;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
k->init = quiesce_init;
k->get_send_... | vuln | Vulnerable | C/C++ |
static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
target_ulong pc_start)
{
int b, prefixes;
int shift;
TCGMemOp ot, aflag, dflag;
int modrm, reg, rm, mod, op, opreg, val;
target_ulong next_eip, tval;
int rex_w, rex_r;
s->pc_start = s->pc = pc_s... | vuln | Safe | C/C++ |
static int ext4_split_extent_at(handle_t *handle,
struct inode *inode,
struct ext4_ext_path *path,
ext4_lblk_t split,
int split_flag,
int flags)
{
ext4_fsblk_t newblock;
ext4_lblk_t ee_block;
struct ext4_extent *ex, newex, orig_ex;
struct ext4_extent *ex2 = NULL;
unsigned in... | vuln | Vulnerable | Unknown |
ImagingSgiRleDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t bytes) {
UINT8 *ptr;
SGISTATE *c;
int err = 0;
int status;
/* size check */
if (im->xsize > INT_MAX / im->bands || im->ysize > INT_MAX / im->bands) {
state->errcode = IMAGING_CODEC_MEMORY;
return -1;... | vuln | Vulnerable | Unknown |
function addChannelPageTools($agencyid, $websiteId, $channelid, $channelType)
{
if ($channelType == 'publisher') {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'affiliate-channels.php');
}
else {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'channel-index.php');
}
$tok... | vuln | Safe | PHP |
it 'has the cookies' do
@settings.has_valid_cookie?.should be_true
end | vuln | Safe | Ruby |
create_response(const char *nurl, const char *method, unsigned int *rp_code)
{
char *page, *fpath;
struct MHD_Response *resp = NULL;
if (!strncmp(nurl, URL_BASE_API_1_1, strlen(URL_BASE_API_1_1))) {
resp = create_response_api(nurl, method, rp_code);
} else {
... | vuln | Vulnerable | Unknown |
static void handle_windowevent(SDL_Event *ev)
{
struct sdl2_console *scon = get_scon_from_window(ev->window.windowID);
if (!scon) {
return;
}
switch (ev->window.event) {
case SDL_WINDOWEVENT_RESIZED:
{
QemuUIInfo info;
memset(&info, 0, sizeof(info));
... | vuln | Safe | C/C++ |
static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno,
int off, int bpf_size, enum bpf_access_type t,
int value_regno, bool strict_alignment_once)
{
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
struct bpf_func_state *state;
int size,... | vuln | Vulnerable | Unknown |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... | vuln | Safe | C/C++ |
@Override
public void run() {
VoiceClient.LOGGER.info("Start ping");
while(!this.socketUDP.isClosed()) {
try {
this.socketUDP.checkTimeout();
Thread.sleep(1000L);
} catch (InterruptedException ignored) {}
}
} | vuln | Vulnerable | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.