code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static void _slurm_rpc_submit_batch_job(slurm_msg_t *msg)
{
static int active_rpc_cnt = 0;
int error_code = SLURM_SUCCESS;
DEF_TIMERS;
uint32_t job_id = 0, priority = 0;
struct job_record *job_ptr = NULL;
slurm_msg_t response_msg;
submit_response_msg_t submit_msg;
job_desc_msg_t *job_desc_msg = (job_desc_msg_t ... | vuln | Safe | Unknown |
static int64_t archipelago_volume_info(BDRVArchipelagoState *s)
{
uint64_t size;
int ret, targetlen;
struct xseg_request *req;
struct xseg_reply_info *xinfo;
AIORequestData *reqdata = g_new(AIORequestData, 1);
const char *volname = s->volname;
targetlen = strlen(volname);
req = xseg_get_... | vuln | Safe | C/C++ |
/**
* OpenKM, Open Document Management System (http://www.openkm.com)
* Copyright (c) 2006-2016 Paco Avila & Josep Llort
* <p>
* No bytes were intentionally harmed during the development of this application.
* <p>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the ... | vuln | Safe | Java |
static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
register IndexPacket
*indexes;
register PixelPacket
*q;
register ssize_t
x;
register unsigned char
*p;
size_t
length;
ssize_t
offset,
y;
... | vuln | Vulnerable | C/C++ |
static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
struct oz_usb_hdr *usb_hdr, int len)
{
struct oz_data *data_hdr = (struct oz_data *)usb_hdr;
switch (data_hdr->format) {
case OZ_DATA_F_MULTIPLE_FIXED: {
struct oz_multiple_fixed *body =
(struct oz_multiple_fixed *)data_hdr;
u8 *data = body... | vuln | Vulnerable | C/C++ |
gen_set_condexec (DisasContext *s)
{
if (s->condexec_mask) {
uint32_t val = (s->condexec_cond << 4) | (s->condexec_mask >> 1);
TCGv tmp = new_tmp();
tcg_gen_movi_i32(tmp, val);
store_cpu_field(tmp, condexec_bits);
}
} | vuln | Vulnerable | C/C++ |
protected function redirectToOperator(Thread $thread, $operator_id)
{
if ($thread->state != Thread::STATE_CHATTING) {
// We can redirect only threads which are in proggress now.
return false;
}
// Redirect the thread
$thread->state = Thread::STATE_WAITING;
... | vuln | Safe | PHP |
static int img_amend(int argc, char **argv)
{
Error *err = NULL;
int c, ret = 0;
char *options = NULL;
QemuOptsList *create_opts = NULL;
QemuOpts *opts = NULL;
const char *fmt = NULL, *filename, *cache;
int flags;
bool quiet = false, progress = false;
BlockBackend *blk = NULL;
Bl... | vuln | Vulnerable | C/C++ |
public void onProceedPressed(Context context) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(R.string.choose_action)
.setItems(R.array.product_array, (dialog, which) -> {
switch (which) {
case 0:
... | vuln | Vulnerable | Java |
extern "C" void *malloc_wrapper(size_t size, void *caller)
{
void *ptr = NULL;
#if MBED_MEM_TRACING_ENABLED
mbed_mem_trace_lock();
#endif
#if MBED_HEAP_STATS_ENABLED
malloc_stats_mutex->lock();
alloc_info_t *alloc_info = NULL;
if (size <= SIZE_MAX - sizeof(alloc_info_t)) {
alloc_info = (allo... | vuln | Safe | Unknown |
/* 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 | Safe | Python |
/* ELF program property support.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
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 Softwa... | vuln | Vulnerable | C/C++ |
const bootbox = require('bootbox');
require('./Requisitions');
/**
* @author Alejandro Galue <agalue@opennms.org>
* @copyright 2014 The OpenNMS Group, Inc.
*/
(function() {
'use strict';
angular.module('onms-requisitions')
/**
* @ngdoc service
* @name SynchronizeService
* @module onms-requisitions
*... | vuln | Safe | Java |
/* 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 |
int sc_file_set_sec_attr(sc_file_t *file, const u8 *sec_attr,
size_t sec_attr_len)
{
u8 *tmp;
if (!sc_file_valid(file)) {
return SC_ERROR_INVALID_ARGUMENTS;
}
if (sec_attr == NULL || sec_attr_len) {
if (file->sec_attr != NULL)
free(file->sec_attr);
file->sec_attr = NULL;
file->sec_attr_len = 0;
re... | vuln | Safe | Unknown |
host_memory_backend_get_host_nodes(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
HostMemoryBackend *backend = MEMORY_BACKEND(obj);
uint16List *host_nodes = NULL;
uint16List **node = &host_nodes;
unsigned long value;
value = find_first_bit... | vuln | Safe | C/C++ |
public static int internalMethodParameterCount(String internalMethodDescriptor,
boolean isStatic)
{
int counter = isStatic ? 0 : 1;
int index = 1;
while (true)
{
char c = internalMethodDescriptor.charAt(index++);
... | vuln | Vulnerable | Java |
vhost_scsi_make_tpg(struct se_wwn *wwn,
struct config_group *group,
const char *name)
{
struct vhost_scsi_tport *tport = container_of(wwn,
struct vhost_scsi_tport, tport_wwn);
struct vhost_scsi_tpg *tpg;
unsigned long tpgt;
int ret;
if (strstr(name, "tpgt_") != name)
return ERR_PTR(-EINVAL)... | vuln | Vulnerable | C/C++ |
int32_t ff_mlp_pack_output(int32_t lossless_check_data,
uint16_t blockpos,
int32_t (*sample_buffer)[MAX_CHANNELS],
void *data,
uint8_t *ch_assign,
int8_t *output_shift,
... | vuln | Vulnerable | C/C++ |
define([
'./summary-widget.html',
'@braintree/sanitize-url'
], function (
summaryWidgetTemplate,
urlSanitizeLib
) {
const WIDGET_ICON_CLASS = 'c-sw__icon js-sw__icon';
function SummaryWidgetView(domainObject, openmct) {
this.openmct = openmct;
this.domainObject = domainObject;
... | vuln | Vulnerable | JavaScript |
tBTA_AV_EVT bta_av_proc_meta_cmd(tAVRC_RESPONSE* p_rc_rsp,
tBTA_AV_RC_MSG* p_msg, uint8_t* p_ctype) {
tBTA_AV_EVT evt = BTA_AV_META_MSG_EVT;
uint8_t u8, pdu, *p;
uint16_t u16;
tAVRC_MSG_VENDOR* p_vendor = &p_msg->msg.vendor;
pdu = *(p_vendor->p_vendor_data);
p_rc_rsp->pdu = p... | vuln | Safe | C/C++ |
public static void removeImprovement(ItemStack itemStack, String slot, String improvement) {
NBTHelper.getTag(itemStack).remove(slot + ":" + improvement);
} | vuln | Vulnerable | Java |
/*
* IRC - Internet Relay Chat, src/modules/m_sasl.c
* (C) 2012 The UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publis... | vuln | Safe | C/C++ |
static int myrecvfrom6(int sockfd, void *buf, size_t *buflen, int flags,
struct in6_addr *addr, uint32_t *ifindex, int *hoplimit)
{
struct sockaddr_in6 sin6;
unsigned char cbuf[2 * CMSG_SPACE(sizeof(struct in6_pktinfo))];
struct iovec iovec;
struct msghdr msghdr;
struct cmsghdr *cmsghdr;
ssize_t len;
i... | vuln | Safe | Unknown |
STATIC_OVL boolean
parse_conf_file(fp, proc)
FILE *fp;
boolean FDECL((*proc), (char *));
{
char inbuf[4 * BUFSZ];
boolean rv = TRUE; /* assume successful parse */
char *ep;
boolean skip = FALSE, morelines = FALSE;
char *buf = (char *) 0;
size_t inbufsz = sizeof inbuf;
free_config_sections()... | vuln | Vulnerable | C/C++ |
"""
Runtime will load the XBlock class from here.
"""
from .apps import LTIConsumerApp
from .lti_xblock import LtiConsumerXBlock
__version__ = '7.2.2'
| vuln | Safe | Python |
static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, int S)
{
int bit;
if(s->extra_bits){
S <<= s->extra_bits;
if(s->got_extra_bits && get_bits_left(&s->gb_extra_bits) >= s->extra_bits){
S |= get_bits(&s->gb_extra_bits, s->extra_bits);
*crc = *crc... | vuln | Safe | C/C++ |
slap_modrdn2mods(
Operation *op,
SlapReply *rs )
{
int a_cnt, d_cnt;
LDAPRDN old_rdn = NULL;
LDAPRDN new_rdn = NULL;
assert( !BER_BVISEMPTY( &op->oq_modrdn.rs_newrdn ) );
/* if requestDN is empty, silently reset deleteOldRDN */
if ( BER_BVISEMPTY( &op->o_req_dn ) ) op->orr_deleteoldrdn = 0;
if ( ldap_bv2... | vuln | Vulnerable | C/C++ |
/*!
* \file LoRaMac.c
*
* \brief LoRa MAC layer implementation
*
* \copyright Revised BSD License, see section \ref LICENSE.
*
* \code
* ______ _
* / _____) _ | |
* ( (____ _____ ____ _| |_ _____ ____| |... | vuln | Vulnerable | C/C++ |
vhost_user_send_rarp(struct virtio_net **pdev, struct VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
uint8_t *mac = (uint8_t *)&msg->payload.u64;
struct rte_vdpa_device *vdpa_dev;
int did = -1;
RTE_LOG(DEBUG, VHOST_CONFIG,
":: mac: %02x:%02x:%02x:%02x:%02x:%02x\n",
mac[0], m... | vuln | Vulnerable | Unknown |
def set_attachment
Log.add_info(request, params.inspect)
created = false
if params[:id].nil? or params[:id].empty?
@item = Item.new_info(0)
@item.attributes = params[:item]
@item.user_id = @login_user.id
@item.title = t('paren.no_title')
[:attachment0, :attachment1].each do ... | vuln | Vulnerable | Ruby |
static void pc87312_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pc87312_realize;
dc->reset = pc87312_reset;
dc->vmsd = &vmstate_pc87312;
dc->props = pc87312_properties;
dc->user_creatable = false;
} | vuln | Safe | C/C++ |
static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
{
FLVContext *flv = s->priv_data;
int ret, i, type, size, flags;
int stream_type=-1;
int64_t next, pos;
int64_t dts, pts = AV_NOPTS_VALUE;
AVStream *st = NULL;
for(;;avio_skip(s->pb, 4)){
pos = avio_tell(s->pb);
type = avio_... | vuln | Vulnerable | C/C++ |
static File createTempDir(String prefix) throws IOException {
File dir;
for (int i = 0; i < maxTempFileAttempts; i++) {
dir = Files.createTempDirectory(prefix).toFile();
if (true) {
return dir;
}
}
throw new RuntimeException("Failed to ... | vuln | Safe | Java |
void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m)
{
struct tftp_t *tp = mtod_check(m, offsetof(struct tftp_t, x.tp_buf));
if (tp == NULL) {
return;
}
switch (ntohs(tp->tp_op)) {
case TFTP_RRQ:
tftp_handle_rrq(m->slirp, srcsas, tp, m->m_len);
break;
case ... | vuln | Vulnerable | Unknown |
@Override
public void onKeyRight(int time) {
if (isVisible(mBinding.widget.center)) App.post(mR2, 500);
if (mChannel.isOnly() && mPlayers.isVod()) mPlayers.seekTo(time);
else if (!mChannel.isOnly()) nextLine(true);
mKeyDown.resetTime();
} | vuln | Vulnerable | Java |
id3_skip (SF_PRIVATE * psf)
{ unsigned char buf [10] ;
memset (buf, 0, sizeof (buf)) ;
psf_binheader_readf (psf, "pb", 0, buf, 10) ;
if (buf [0] == 'I' && buf [1] == 'D' && buf [2] == '3')
{ int offset = buf [6] & 0x7f ;
offset = (offset << 7) | (buf [7] & 0x7f) ;
offset = (offset << 7) | (buf [8] & 0x7f) ;
... | vuln | Vulnerable | C/C++ |
static int parse_dsd_diin(AVFormatContext *s, AVStream *st, uint64_t eof)
{
AVIOContext *pb = s->pb;
while (avio_tell(pb) + 12 <= eof) {
uint32_t tag = avio_rl32(pb);
uint64_t size = avio_rb64(pb);
uint64_t orig_pos = avio_tell(pb);
const char * metadata_tag = NULL;
... | vuln | Vulnerable | C/C++ |
private void tick() {
if (stock != null && MinecraftClient.isReady()) {
if (Mouse.getDrag() == null) {
component.stopClientDragging();
new DragPacket(stock, component, false, 0, true).sendToServer();
stock = null;
component = null;
... | vuln | Safe | Java |
static void balloon_stats_change_timer(VirtIOBalloon *s, int secs)
{
timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000);
} | vuln | Vulnerable | C/C++ |
static void virtio_gpu_resource_destroy(VirtIOGPU *g,
struct virtio_gpu_simple_resource *res)
{
pixman_image_unref(res->image);
virtio_gpu_cleanup_mapping(res);
QTAILQ_REMOVE(&g->reslist, res, next);
g->hostmem -= res->hostmem;
g_free(res);
} | vuln | Safe | C/C++ |
public void processRequest() throws Exception {
String dir = SQLInitServlet.getField("filePath") + "crf" + File.separator + "new" + File.separator;
// YW 09-10-2007 << Now CRF_Design_Template_v2.xls is located at
// $CATALINA_HOME/webapps/OpenClinica-instanceName/properties
FormProcessor... | vuln | Vulnerable | Java |
/*
* GPAC - Multimedia Framework C SDK
*
* Authors: Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2000-2012
* All rights reserved
*
* This file is part of GPAC / Scene Management sub-project
*
* GPAC is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser... | vuln | Safe | C/C++ |
public void stop(){
if (client != null){
logger.info("Closing...");
isConnected = false;
client.close();
client = null;
}
} | vuln | Safe | Java |
static void scsi_dma_complete(void *opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
bdrv_acct_done(s->qdev.conf.bs, &r->acct);
}
if (ret < 0) {
if (scsi_... | vuln | Vulnerable | C/C++ |
rsyncssh.action = function( inlet )
local event, event2 = inlet.getEvent( )
local config = inlet.getConfig( )
-- makes move local on target host
-- if the move fails, it deletes the source
if event.etype == 'Move' then
log(
'Normal',
'Moving ',
event.path,
' -> ',
event2.path
)
spawn(
... | vuln | Vulnerable | Lua |
OMX_ERRORTYPE SoftAMRNBEncoder::internalGetParameter(
OMX_INDEXTYPE index, OMX_PTR params) {
switch (index) {
case OMX_IndexParamAudioPortFormat:
{
OMX_AUDIO_PARAM_PORTFORMATTYPE *formatParams =
(OMX_AUDIO_PARAM_PORTFORMATTYPE *)params;
if (!isValidOMXParam(format... | vuln | Safe | C/C++ |
@Override
public Supplier<OpenRegistry<Palette>> registrySupplier() {
return () -> pack.getRegistryFactory().create(registry -> (TypeLoader<Palette>) (t, c, loader) -> {
if(((String) c).startsWith("BLOCK:"))
return new PaletteImpl.Singleton(main.getWorldHandle().createBlockData((... | vuln | Safe | Java |
static void vhost_scsi_realize(DeviceState *dev, Error **errp)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev);
VHostSCSI *s = VHOST_SCSI(dev);
Error *err = NULL;
int vhostfd = -1;
int ret;
if (!vs->conf.wwpn) {
error_setg(errp, "vhost-scsi: missing wwpn");
return;
}
if ... | vuln | Safe | C/C++ |
static int parse_key(DBEContext *s)
{
int key = 0;
if (s->key_present && s->input_size > 0)
key = AV_RB24(s->input) >> 24 - s->word_bits;
skip_input(s, s->key_present);
return key;
} | vuln | Vulnerable | C/C++ |
CollationCreate(const char *collname, Oid collnamespace,
Oid collowner,
char collprovider,
bool collisdeterministic,
int32 collencoding,
const char *collcollate, const char *collctype,
const char *colliculocale,
const char *collversion,
bool if_not_exists,
bool quiet)
{
Relation rel... | vuln | Vulnerable | Unknown |
static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
{
u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
u32 exit_reason = vmx->exit_reason;
trace_kvm_nested_vmexit(kvm_rip_read(vcpu), exit_reason,
vmcs_readl(EXIT_QUALIFICATION... | vuln | Safe | Unknown |
private void onFilterStatus(int status) {
if (mCallback != null && mExecutor != null) {
mExecutor.execute(() -> mCallback.onFilterStatusChanged(this, status));
}
} | vuln | Vulnerable | Java |
static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner,
const char *name,
uint64_t ram_size)
{
if (mem_path) {
#ifdef __linux__
Error *err = NULL;
memory_region_init_ram_from_file(mr, owner, nam... | vuln | Vulnerable | C/C++ |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Vulnerable | C/C++ |
/*
* ring buffer based function tracer
*
* Copyright (C) 2007-2012 Steven Rostedt <srostedt@redhat.com>
* Copyright (C) 2008 Ingo Molnar <mingo@redhat.com>
*
* Originally taken from the RT patch by:
* Arnaldo Carvalho de Melo <acme@redhat.com>
*
* Based on code from the latency_tracer, that is:
* Copyrigh... | vuln | Safe | C/C++ |
curve25519_eh_to_x (mp_limb_t *xp, const mp_limb_t *p,
mp_limb_t *scratch)
{
#define vp (p + ecc->p.size)
#define wp (p + 2*ecc->p.size)
#define t0 scratch
#define t1 (scratch + ecc->p.size)
#define tp (scratch + 2*ecc->p.size)
const struct ecc_curve *ecc = &_nettle_curve25519;
/* If u = U/W and v = V/W are... | vuln | Safe | Unknown |
@Override
protected void handleConnect(CommandConnect connect) {
checkArgument(state == State.Start);
if (log.isDebugEnabled()) {
log.debug("Received CONNECT from {}, auth enabled: {}:"
+ " has original principal = {}, original principal = {}",
remote... | vuln | Vulnerable | Java |
public static String escapeJavaScriptStringHTML(String v) {
if (v == null) {
return null;
}
return StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(v));
} | vuln | Safe | Java |
gs_call_interp(i_ctx_t **pi_ctx_p, ref * pref, int user_errors,
int *pexit_code, ref * perror_object)
{
ref *epref = pref;
ref doref;
ref *perrordict;
ref error_name;
int code, ccode;
ref saref;
i_ctx_t *i_ctx_p = *pi_ctx_p;
int *gc_signal = &imemory_system->gs_lib_ctx->gc... | vuln | Safe | Unknown |
static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ClientName "montage"
char
**filelist,
*label,
**list;
Image
*image,
*images,
*montage_image,
*next_image,
*thumbnail_image;
ImageInfo
*read_info;
int
number_files;
MagickBoo... | vuln | Safe | C/C++ |
static void ahci_irq_raise(AHCIState *s, AHCIDevice *dev)
{
AHCIPCIState *d = container_of(s, AHCIPCIState, ahci);
PCIDevice *pci_dev =
(PCIDevice *)object_dynamic_cast(OBJECT(d), TYPE_PCI_DEVICE);
DPRINTF(0, "raise irq\n");
if (pci_dev && msi_enabled(pci_dev)) {
msi_notify(pci_dev, 0);
... | vuln | Vulnerable | C/C++ |
int32 CommandBufferProxyImpl::RegisterTransferBuffer(
base::SharedMemory* shared_memory,
size_t size,
int32 id_request) {
if (last_state_.error != gpu::error::kNoError)
return -1;
// Returns FileDescriptor with auto_close off.
base::SharedMemoryHandle handle = shared_memory->handle();
#if defi... | vuln | Safe | C/C++ |
void Lua::setParamsTable(lua_State* vm, const char* table_name,
const char* query) const {
char outbuf[FILENAME_MAX];
char *where;
char *tok;
char *query_string = query ? strdup(query) : NULL;
lua_newtable(L);
if (query_string) {
// ntop->getTrace()->traceEvent(TRACE_WARNING, "[HTTP] %s", query_s... | vuln | Vulnerable | C/C++ |
static int tmv_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{
TMVContext *tmv = s->priv_data;
int64_t pos;
if (stream_index)
return -1;
pos = timestamp *
(tmv->audio_chunk_size + tmv->video_chunk_size + tmv->padding);
avio_s... | vuln | Vulnerable | C/C++ |
static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
AVCodecParserContext *pc, AVPacket *pkt,
int64_t next_dts, int64_t next_pts)
{
int num, den, presentation_delayed, delay, i;
int64_t offset;
AVRational duration;
int onein_oneou... | vuln | Safe | C/C++ |
void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp)
{
Error *err = NULL;
assert(obj);
v->type_any(v, name, obj, &err);
if (v->type == VISITOR_INPUT) {
assert(!err != !*obj);
}
error_propagate(errp, err);
} | vuln | Safe | C/C++ |
static TEE_Result do_alloc_keypair(struct ecc_keypair *s, uint32_t type,
size_t size_bits __unused)
{
/* This driver only supports ECDH/ECDSA */
if (type != TEE_TYPE_ECDSA_KEYPAIR &&
type != TEE_TYPE_ECDH_KEYPAIR)
return TEE_ERROR_NOT_IMPLEMENTED;
memset(s, 0, sizeof(*s));
if (!bn_alloc_max(&s->d))
... | vuln | Safe | C/C++ |
static void asmlinkage smm_do_relocation(void *arg)
{
const struct smm_module_params *p;
const struct smm_runtime *runtime;
int cpu;
uintptr_t curr_smbase;
uintptr_t perm_smbase;
p = arg;
runtime = p->runtime;
cpu = p->cpu;
curr_smbase = runtime->smbase;
if (cpu >= CONFIG_MAX_CPUS) {
printk(BIOS_CRIT,
... | vuln | Vulnerable | Unknown |
struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
{
struct ext4_iloc iloc;
struct ext4_inode *raw_inode;
struct ext4_inode_info *ei;
struct inode *inode;
journal_t *journal = EXT4_SB(sb)->s_journal;
long ret;
loff_t size;
int block;
uid_t i_uid;
gid_t i_gid;
projid_t i_projid;
inode = iget... | vuln | Vulnerable | Unknown |
/*
* Copyright © 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io>
*
* 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... | vuln | Vulnerable | Go |
OMX_ERRORTYPE SoftAAC2::internalGetParameter(
OMX_INDEXTYPE index, OMX_PTR params) {
switch (index) {
case OMX_IndexParamAudioAac:
{
OMX_AUDIO_PARAM_AACPROFILETYPE *aacParams =
(OMX_AUDIO_PARAM_AACPROFILETYPE *)params;
if (aacParams->nPortIndex != 0) {
... | vuln | Vulnerable | C/C++ |
package de.presti.ree6.sql.entities.webhook;
import de.presti.ree6.sql.base.annotations.Table;
/**
* SQL Entity for the News-Webhooks.
*/
@Table(name = "NewsWebhooks")
public class WebhookNews extends Webhook {
/**
* Constructor.
*/
public WebhookNews() {
}
/**
* @inheritDoc
*/... | vuln | Safe | Java |
static njs_int_t
njs_module_path(njs_vm_t *vm, const njs_str_t *dir, njs_module_info_t *info)
{
char *p;
size_t length;
njs_bool_t trail;
char src[NJS_MAX_PATH + 1];
trail = 0;
length = info->name.length;
if (dir != NULL) {
length = dir->length;
if (len... | vuln | Vulnerable | C/C++ |
import os
import time
import json
from secrets import token_bytes, token_hex, randbits
from hashlib import sha256
import asyncio
import aiosqlite as sql
from responses import *
class Database:
def __init__(self, session):
loop = asyncio.get_event_loop()
# lock to prevent race conditions when SELECT... | vuln | Safe | Python |
var responseHandler = function(resp) {
// Set response var to the response we got back
// This is so it remains accessable outside this scope
response = resp;
// Check for redirect
// @TODO Prevent looped redirects
if (response.statusCode === 302 || response.statusCode ==... | vuln | Vulnerable | JavaScript |
ZSTD_buildCTable(void* dst, size_t dstCapacity,
FSE_CTable* nextCTable, U32 FSELog, symbolEncodingType_e type,
U32* count, U32 max,
const BYTE* codeTable, size_t nbSeq,
const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax,
const FSE_C... | vuln | Vulnerable | C/C++ |
@app.route('/quiz')
def quiz():
varga = request.args.get('varga')
try:
rows =[]
with sql.connect('amara.db') as con:
con.row_factory = sql.Row
cur = con.cursor()
cur.execute("select * from pada inner join mula on pada.sloka_line = mula.sloka_line where pada... | vuln | Vulnerable | Python |
static int tsc210x_load(QEMUFile *f, void *opaque, int version_id)
{
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->... | vuln | Safe | Unknown |
void DatabaseMessageFilter::OnHandleSqliteError(
const string16& origin_identifier,
const string16& database_name,
int error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
db_tracker_->HandleSqliteError(origin_identifier, database_name, error);
} | vuln | Vulnerable | C/C++ |
import namedavatar from 'namedavatar'
import { i18nReady, t } from './i18n.js'
import { Globalsettings } from '../api/globalsettings/globalsettings.js'
const clientTimecards = new Mongo.Collection('clientTimecards')
function getGlobalSetting(name) {
return Globalsettings.findOne({ name }) ? Globalsettings.findOne({... | vuln | Vulnerable | JavaScript |
rdt_free_extradata (PayloadContext *rdt)
{
ff_rm_free_rmstream(rdt->rmst[0]);
av_free(rdt->rmst[0]);
if (rdt->rmctx)
av_close_input_stream(rdt->rmctx);
av_freep(&rdt->mlti_data);
av_free(rdt);
} | vuln | Safe | C/C++ |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | vuln | Vulnerable | C/C++ |
cockpit_auth_login_finish (CockpitAuth *self,
GAsyncResult *result,
GIOStream *connection,
GHashTable *headers,
GError **error)
{
JsonObject *body = NULL;
CockpitCreds *creds = NULL;
CockpitSession *session... | vuln | Safe | Unknown |
int kvm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
{
switch (msr->index) {
case MSR_FS_BASE:
case MSR_GS_BASE:
case MSR_KERNEL_GS_BASE:
case MSR_CSTAR:
case MSR_LSTAR:
if (is_noncanonical_address(msr->data))
return 1;
break;
case MSR_IA32_SYSENTER_EIP:
case MSR_IA32_SYSENTER_ESP:
/*
* IA3... | vuln | Safe | C/C++ |
static void usbredir_handle_destroy(USBDevice *udev)
{
USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev);
qemu_chr_delete(dev->cs);
dev->cs = NULL;
qemu_bh_delete(dev->chardev_close_bh);
qemu_del_timer(dev->attach_timer);
qemu_free_timer(dev->attach_timer);
usbredir_cleanup_dev... | vuln | Safe | C/C++ |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
switch (input->type) {
case kTfLiteInt64:
reference_ops::Negate(
GetTensorShape(input), GetTensorData... | vuln | Vulnerable | C/C++ |
nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
char *fname, int flen, struct iattr *iap,
int type, dev_t rdev, struct svc_fh *resfhp)
{
struct dentry *dentry, *dchild;
struct inode *dirp;
__be32 err;
__be32 err2;
int host_err;
dentry = fhp->fh_dentry;
dirp = d_inode(dentry);
dchild = dg... | vuln | Vulnerable | Unknown |
void audit_put_chunk(struct audit_chunk *chunk)
{
put_inotify_watch(&chunk->watch);
} | vuln | Vulnerable | Unknown |
private static String getCurrentWorldOrServerName() {
IntegratedServer integratedServer = client.getServer();
if (integratedServer != null) {
return integratedServer.getSaveProperties().getLevelName();
}
ServerInfo serverInfo = client.getCurrentServerEntry();
if (ser... | vuln | Vulnerable | Java |
protected void addSignalEventSubscriptions(CommandContext commandContext,
ProcessDefinitionEntity processDefinition,
Process process,
BpmnModel bpmnModel) {
if (process !=... | vuln | Safe | Java |
static void read_multiple_complete_cb(struct gatt_db_attribute *attr, int err,
const uint8_t *value, size_t len,
void *user_data)
{
struct read_mult_data *data = user_data;
struct gatt_db_attribute *next_attr;
uint16_t handle = gatt_db_attribute_get_handle(attr);
uint8_t ecode;
uint16_t length;
if (err... | vuln | Safe | Unknown |
static void tg3_read_vpd(struct tg3 *tp)
{
u8 *vpd_data;
unsigned int block_end, rosize, len;
u32 vpdlen;
int j, i = 0;
vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen);
if (!vpd_data)
goto out_no_vpd;
i = pci_vpd_find_tag(vpd_data, 0, vpdlen, PCI_VPD_LRDT_RO_DATA);
if (i < 0)
goto out_not_found;
rosize ... | vuln | Vulnerable | C/C++ |
radix__arch_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
struct vm_unmapped_area_info info;
if (unlikely(addr > mm->context.addr_limit &&
mm->context.add... | vuln | Vulnerable | Unknown |
int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK(args[0]->IsObject());
CHECK(args[1]->IsString());
Local<Object> req_wrap_obj = args[0].As<Object>();
Local<String> string = args[1].As<String>();
Local<Object> send_handle_obj;
i... | vuln | Safe | Unknown |
SPL_METHOD(SplDoublyLinkedList, offsetUnset)
{
zval *zindex;
long index;
spl_dllist_object *intern;
spl_ptr_llist_element *element;
spl_ptr_llist *llist;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &zindex) == FAILURE) {
return;
}
intern = (spl_dl... | vuln | Safe | Unknown |
void fp2_read_bin(fp2_t a, const uint8_t *bin, int len) {
if (len != RLC_FP_BYTES + 1 && len != 2 * RLC_FP_BYTES) {
RLC_THROW(ERR_NO_BUFFER);
return;
}
if (len == RLC_FP_BYTES + 1) {
fp_read_bin(a[0], bin, RLC_FP_BYTES);
fp_zero(a[1]);
fp_set_bit(a[1], 0, bin[RLC_FP_BYTES]);
fp2_upk(a, a);
}
if (len ==... | vuln | Vulnerable | C/C++ |
private void ensureCapacityFor(@NotNull final IntBuffer valuesToAdd) {
if(!valuesToAdd.hasRemaining()) {
return;
}
final int currentCapacity = targetBuffer.capacity();
final int currentPosition = targetBuffer.position();
final int requiredCapacity = currentPosition +... | vuln | Vulnerable | Java |
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qtextlayout.h"
#include "qtextengine_p.h"
#include <qthread.h>
#include <qfont.h>
#include <qmath.h>
#include <qpainter.h>
#include <qvarlengtharray.h>
#include <qt... | vuln | Vulnerable | C/C++ |
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onFall(final GenericGameEvent event) {
Entity entity = event.getEntity();
if (entity == null) return;
Location eLoc = entity.getLocation();
if (!isLoaded(event.getLocation()) || !isLoaded(eLoc)) return... | vuln | Safe | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.