code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static u16 swf_get_16(SWFReader *read)
{
u16 val, res;
val = swf_read_int(read, 16);
res = (val&0xFF);
res <<=8;
res |= ((val>>8)&0xFF);
return res;
} | vuln | Vulnerable | C/C++ |
/* Copyright 2016 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 |
int parse_sequence_header(davs2_mgr_t *mgr, davs2_seq_t *seq, davs2_bs_t *bs)
{
static const float FRAME_RATE[8] = {
24000.0f / 1001.0f, 24.0f, 25.0f, 30000.0f / 1001.0f, 30.0f, 50.0f, 60000.0f / 1001.0f, 60.0f
};
rps_t *p_rps = NULL;
int i, j;
int num_of_rps;
bs->i_bit_pos += 32;... | vuln | Vulnerable | Unknown |
static int generate_key(DH *dh)
{
int ok = 0;
int generate_new_key = 0;
unsigned l;
BN_CTX *ctx;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
ctx = BN_CTX_new();
if (ctx == NULL)
goto err;
if (dh->priv_key == NULL) {
priv_key = BN_secure_new()... | vuln | Vulnerable | Unknown |
void hashTypeTryConversion(robj *o, robj **argv, int start, int end) {
int i;
if (o->encoding != OBJ_ENCODING_ZIPLIST) return;
for (i = start; i <= end; i++) {
if (sdsEncodedObject(argv[i]) &&
sdslen(argv[i]->ptr) > server.hash_max_ziplist_value)
{
hashTypeConvert(o... | vuln | Vulnerable | Unknown |
static int decode_hq_slice(AVCodecContext *avctx, void *arg)
{
int i, quant, level, orientation, quant_idx;
uint8_t quants[MAX_DWT_LEVELS][4];
DiracContext *s = avctx->priv_data;
DiracSlice *slice = arg;
GetBitContext *gb = &slice->gb;
skip_bits_long(gb, 8*s->highquality.prefix_bytes);
quant... | vuln | Vulnerable | C/C++ |
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Drawing Orders
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
* Copyright 2016 Armin Novak <armin.novak@thincast.com>
* Copyright 2016 Thincast Technologies GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* yo... | vuln | Safe | C/C++ |
import tv4 from 'tv4';
import Parse from 'parse/node';
import { Subscription } from './Subscription';
import { Client } from './Client';
import { ParseWebSocketServer } from './ParseWebSocketServer';
import logger from '../logger';
import RequestSchema from './RequestSchema';
import { matchesQuery, queryHash } from './... | vuln | Safe | JavaScript |
static int ath6kl_wmi_pstream_timeout_event_rx(struct wmi *wmi, u8 *datap,
int len)
{
struct wmi_pstream_timeout_event *ev;
if (len < sizeof(struct wmi_pstream_timeout_event))
return -EINVAL;
ev = (struct wmi_pstream_timeout_event *) datap;
/*
* When the pstream (fat pipe == AC) timesout, it mean... | vuln | Vulnerable | C/C++ |
static int
lzma_filter_converter(_lzma_state *state, PyObject *spec, void *ptr)
{
lzma_filter *f = (lzma_filter *)ptr;
PyObject *id_obj;
if (!PyMapping_Check(spec)) {
PyErr_SetString(PyExc_TypeError,
"Filter specifier must be a dict or dict-like object");
return 0;
... | vuln | Safe | C/C++ |
static int samldb_lockout_time(struct samldb_ctx *ac)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
NTTIME lockoutTime;
struct ldb_message_element *el;
struct ldb_message *tmp_msg;
int ret;
ret = dsdb_get_expected_new_values(ac,
ac->msg,
"lockoutTime",
&el,
ac->req->... | vuln | Vulnerable | Unknown |
unsigned long hbitmap_iter_skip_words(HBitmapIter *hbi)
{
size_t pos = hbi->pos;
const HBitmap *hb = hbi->hb;
unsigned i = HBITMAP_LEVELS - 1;
unsigned long cur;
do {
cur = hbi->cur[--i];
pos >>= BITS_PER_LEVEL;
} while (cur == 0);
if (i == 0 && cur == (1UL << (BITS_PER_... | vuln | Vulnerable | C/C++ |
public DSpaceObject getParentObject(Context context, Group group) throws SQLException {
if (group == null) {
return null;
}
// could a collection/community administrator manage related groups?
// check before the configuration options could give a performance gain
// ... | vuln | Vulnerable | Java |
//+build libpam
/*
Maddy Mail Server - Composable all-in-one email server.
Copyright © 2019-2022 Max Mazurov <fox.cpp@disroot.org>, Maddy Mail Server contributors
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... | vuln | Safe | Go |
TPM2B_PRIVATE_KEY_RSA_Marshal(TPM2B_PRIVATE_KEY_RSA *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM2B_Marshal(&source->b, buffer, size);
return written;
} | vuln | Vulnerable | Unknown |
int hci_req_sync(struct hci_dev *hdev, int (*req)(struct hci_request *req,
unsigned long opt),
unsigned long opt, u32 timeout, u8 *hci_status)
{
int ret;
if (!test_bit(HCI_UP, &hdev->flags))
return -ENETDOWN;
/* Serialize all requests */
hci_req_sync_lock(hdev);
ret = __hci_req_sync(hdev, req, opt, ... | vuln | Vulnerable | Unknown |
const Chapters::Atom* Chapters::Edition::GetAtom(int index) const
const Chapters::Display* Chapters::Atom::GetDisplay(int index) const {
if (index < 0)
return NULL;
if (index >= m_displays_count)
return NULL;
return m_displays + index;
} | vuln | Safe | C/C++ |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | vuln | Vulnerable | C/C++ |
private static boolean isVoid(JCTree.JCMethodInvocation methodInvocation) {
if (!methodInvocation.type.isPrimitive()) {
return methodInvocation.type.isPrimitiveOrVoid();
}
return false;
} | vuln | Vulnerable | Java |
static int acp_hw_init(void *handle)
{
int r, i;
uint64_t acp_base;
u32 val = 0;
u32 count = 0;
struct device *dev;
struct i2s_platform_data *i2s_pdata;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
const struct amdgpu_ip_block *ip_block =
amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE... | vuln | Vulnerable | C/C++ |
static void tci_out_label(TCGContext *s, TCGArg arg)
{
TCGLabel *label = &s->labels[arg];
if (label->has_value) {
tcg_out_i(s, label->u.value);
assert(label->u.value);
} else {
tcg_out_reloc(s, s->code_ptr, sizeof(tcg_target_ulong), arg, 0);
tcg_out_i(s, 0);
}
} | vuln | Vulnerable | C/C++ |
/*
* Copyright ConsenSys AG.
*
* 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... | vuln | Safe | Java |
lex(struct scanner *s, union lvalue *val)
{
skip_more_whitespace_and_comments:
/* Skip spaces. */
while (is_space(peek(s)))
if (next(s) == '\n')
return TOK_END_OF_LINE;
/* Skip comments. */
if (chr(s, '#')) {
skip_to_eol(s);
goto skip_more_whitespace_and_comments;
... | vuln | Safe | C/C++ |
TPM_CLOCK_ADJUST_Unmarshal(TPM_CLOCK_ADJUST *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPM_CLOCK_ADJUST orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = INT8_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target) {
case... | vuln | Safe | Unknown |
function mergeConfig(from, to) {
for (var f in from) {
if (_.isObject(from[f])) {
if (!_.isObject(to[f])) {
to[f] = from[f];
} else {
mergeConfig(from[f], to[f]);
}
} else {
to[f] = from[f];
}
}
} | vuln | Vulnerable | JavaScript |
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// 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 ... | vuln | Vulnerable | Go |
build_next (GstRTSPBuilder * builder, GstRTSPMessage * message,
GstRTSPConnection * conn, gboolean block)
{
GstRTSPResult res;
while (TRUE) {
switch (builder->state) {
case STATE_START:
{
guint8 c;
builder->offset = 0;
res =
read_bytes (conn, (guint8 *) buil... | vuln | Vulnerable | C/C++ |
@Override
public Iterator<KeyValueFrequency> iterator() {
List<Iterator<KeyValueFrequency>> iters = new ArrayList<>(splits.size() + key2Frequency.size());
splits.stream().map(file -> {
DataInputStream dataInput = null;
try {
InputStream input = inputStreamFunction.apply(new FileInputStream... | vuln | Vulnerable | Java |
private static void processFilename(Path path, ProcessMethod processMethod) throws IOException {
String filename = path.getFileName().toString();
Path newPath = null;
if (processMethod == ProcessMethod.ENCODE) {
// Check if the filename have already been encoded.
try {
... | vuln | Vulnerable | Java |
public static String getCreatorRealmName(final Authentication authentication) {
if (authentication.isApiKey()) {
return (String) authentication.getMetadata().get(AuthenticationField.API_KEY_CREATOR_REALM_NAME);
} else {
return authentication.getSourceRealm().getName();
}
... | vuln | Safe | Java |
private Session loginWithUserPass(int timeoutMilliSeconds) throws NetconfException {
try {
Session session = sshClient.getSession(userName, hostName, port);
session.setConfig("userauth", "password");
session.setConfig("StrictHostKeyChecking", isStrictHostKeyChecking() ? "yes"... | vuln | Safe | Java |
static int check_resource_valid(struct vrend_renderer_resource_create_args *args)
{
/* do not accept handle 0 */
if (args->handle == 0)
return -1;
/* limit the target */
if (args->target >= PIPE_MAX_TEXTURE_TYPES)
return -1;
if (args->format >= VIRGL_FORMAT_MAX)
return -1;
bool for... | vuln | Safe | Unknown |
mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(n... | vuln | Vulnerable | JavaScript |
static const ut8 *parse_die(const ut8 *buf, const ut8 *buf_end, RzBinDwarfDebugInfo *info, RzBinDwarfAbbrevDecl *abbrev,
RzBinDwarfCompUnitHdr *hdr, RzBinDwarfDie *die, const ut8 *debug_str, size_t debug_str_len, bool big_endian) {
size_t i;
const char *comp_dir = NULL;
ut64 line_info_offset = UT64_MAX;
if (abbrev... | vuln | Safe | C/C++ |
public function embed($raw, $auto = FALSE, $echo = TRUE)
{
$this->set_url($raw);
$output = FALSE;
// Get video code from url.
$code = str_replace($this->service['baseurl'], "", $this->url);
switch($this->service_name)
{
case "youtube":
// Check for autoplay
$you_auto = ($auto) ? "&autoplay... | vuln | Vulnerable | PHP |
@Override
public Arguments getLaunchArguments(LaunchOptions options) throws IOException {
if (!options.isDaemon()) return null;
server = new YggdrasilServer(0);
server.start();
try {
server.addCharacter(new YggdrasilServer.Character(uuid, usernam... | vuln | Safe | Java |
/*
* Dragonfly - Runtime dependency management library
* Copyright (c) 2021 Joshua Sing <joshua@hypera.dev>
*
* 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, in... | vuln | Vulnerable | Java |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, SUPERUSER_ID
from odoo.tools.translate import _
from odoo.exceptions import UserError
AVAILABLE_PRIORITIES = [
('0', 'Normal'),
('1', 'Good'),
('2', 'Very Good'),
('... | vuln | Safe | Python |
ZlibInStream::ZlibInStream(int bufSize_)
: underlying(0), bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0),
zs(NULL), bytesIn(0)
{
ptr = end = start = new U8[bufSize];
init();
} | vuln | Vulnerable | C/C++ |
static void do_video_stats(OutputStream *ost, int frame_size)
{
AVCodecContext *enc;
int frame_number;
double ti1, bitrate, avg_bitrate;
if (!vstats_file) {
vstats_file = fopen(vstats_filename, "w");
if (!vstats_file) {
perror("fopen");
exit(1);
}
... | vuln | Vulnerable | C/C++ |
const got = require('@/utils/got');
const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
const { isValidHost } = require('@/utils/valid-host');
const cateList = ['all', 'design-resources', 'learn-design', 'inside-eagle'];
module.exports = async (ctx) => {
let cate = ctx.params.c... | vuln | Safe | JavaScript |
Packet *PacketTunnelPktSetup(ThreadVars *tv, DecodeThreadVars *dtv, Packet *parent,
uint8_t *pkt, uint32_t len, enum DecodeTunnelProto proto,
PacketQueue *pq)
{
int ret;
SCEnter();
/* get us a packet */
Packet *p = PacketGetFromQueueOrAlloc();
... | vuln | Safe | C/C++ |
gss_verify_mic (minor_status,
context_handle,
message_buffer,
token_buffer,
qop_state)
OM_uint32 * minor_status;
gss_ctx_id_t context_handle;
gss_buffer_t message_buffer;
gss_buffer_t token_buffer;
gss_qop_t * qop_state;
{
OM_uint32 status;
gss_union_ctx_id_t ctx;
gss_mechanism mech;
i... | vuln | Safe | C/C++ |
function XMLRPCblockAllocation($imageid, $start, $end, $numMachines,
$usergroupid, $ignoreprivileges=0) {
global $user, $xmlrpcBlockAPIUsers;
if(! in_array($user['id'], $xmlrpcBlockAPIUsers)) {
return array('status' => 'error',
'errorcode' => 34,
'errorms... | vuln | Safe | PHP |
close_pcsc_reader_wrapped (int slot)
{
long err;
reader_table_t slotp;
size_t len;
int i;
unsigned char msgbuf[9];
slotp = reader_table + slot;
if (slotp->pcsc.req_fd == -1
|| slotp->pcsc.rsp_fd == -1
|| slotp->pcsc.pid == (pid_t)(-1) )
{
log_error ("close_pcsc_reader: pcsc-wrapper... | vuln | Safe | Unknown |
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available... | vuln | Vulnerable | Java |
bool asn1_write_OctetString(struct asn1_data *data, const void *p, size_t length)
{
if (!asn1_push_tag(data, ASN1_OCTET_STRING)) return false;
if (!asn1_write(data, p, length)) return false;
return asn1_pop_tag(data);
} | vuln | Safe | Unknown |
bool CheckClientDownloadRequest::ShouldUploadForMalwareScan(
DownloadCheckResultReason reason) {
if (!base::FeatureList::IsEnabled(kDeepScanningOfDownloads))
return false;
if (reason != DownloadCheckResultReason::REASON_DOWNLOAD_SAFE &&
reason != DownloadCheckResultReason::REASON_DOWNLOAD_UNCOMMON &&... | vuln | Safe | C/C++ |
# -*- coding: utf-8 -*-
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2012-2021 rdiffweb contributors
#
# 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 ... | vuln | Vulnerable | Python |
@Override
protected HttpProblem toProblem(AuthenticationFailedException exception) {
return HttpUnauthorizedUtils.toProblem(currentVertxRequest().getCurrent(), exception)
.await().indefinitely();
} | vuln | Safe | Java |
public static String name(int id) {
if (id == 36) {
return "AsyncTask";
}
for (int i = 0; i < cachedCustomComponents.size(); i++) {
HashMap<String, Object> component = cachedCustomComponents.get(i);
if (component != null) {
Object componentId ... | vuln | Safe | Java |
add(key,val){
// this.child.push( {name : key, val: val, isCdata: isCdata });
this.child.push( {[key]: val });
} | vuln | Vulnerable | JavaScript |
void rdma_start_outgoing_migration(void *opaque,
const char *host_port, Error **errp)
{
MigrationState *s = opaque;
RDMAContext *rdma = qemu_rdma_data_init(host_port, errp);
int ret = 0;
if (rdma == NULL) {
goto err;
}
ret = qemu_rdma_source_init(rdma, errp,
... | vuln | Safe | C/C++ |
(function()
{
// Adds Floorplan shapes
Sidebar.prototype.addFloorplanPalette = function()
{
var w = 100;
var h = 100;
var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;align=center;shape=mxgraph.floorplan.';
var s2 = mxConstants.STYLE_VERTICAL_LA... | vuln | Safe | Java |
/*
* TechnoTrend PVA (.pva) demuxer
* Copyright (c) 2007, 2008 Ivo van Poorten
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 o... | vuln | Vulnerable | C/C++ |
private double walkingPhase(double time) {
double timeHours = MarsClock.HOURS_PER_MILLISOL * time;
double speed = 0;
if (person != null) {
speed = person.calculateWalkSpeed();
}
else if (robot != null) {
speed = robot.calculateWalkSpeed();
}
else {
throw new IllegalStateException("Do not know... | vuln | Vulnerable | Java |
// SPDX-License-Identifier: GPL-2.0
#include <stdbool.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "metricgroup.h"
#include "cpumap.h"
#include "cputopo.h"
#include "debug.h"
#include "expr.h"
#include "expr-bison.h"
#include "expr-flex.h"
#include "smt.h"
#include <linux/k... | vuln | Vulnerable | C/C++ |
static int rtsx_usb_ms_drv_probe(struct platform_device *pdev)
{
struct memstick_host *msh;
struct rtsx_usb_ms *host;
struct rtsx_ucr *ucr;
int err;
ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent));
if (!ucr)
return -ENXIO;
dev_dbg(&(pdev->dev),
"Realtek USB Memstick controller found\n");
msh ... | vuln | Vulnerable | Unknown |
BuildIndexValueDescription(Relation indexRelation,
Datum *values, bool *isnull)
{
StringInfoData buf;
int natts = indexRelation->rd_rel->relnatts;
int i;
initStringInfo(&buf);
appendStringInfo(&buf, "(%s)=(",
pg_get_indexdef_columns(RelationGetRelid(indexRelation),
true));
for (i ... | vuln | Vulnerable | Unknown |
static uint8_t *extend_raw_data(LHAFileHeader **header,
LHAInputStream *stream,
size_t nbytes)
{
LHAFileHeader *new_header;
size_t new_raw_len;
uint8_t *result;
if (nbytes > LEVEL_3_MAX_HEADER_LEN) {
return NULL;
}
new_raw_len = RAW_DATA_LE... | vuln | Safe | C/C++ |
/*
** proc.c - Proc class
**
** See Copyright Notice in mruby.h
*/
#include <mruby.h>
#include <mruby/class.h>
#include <mruby/proc.h>
#include <mruby/opcode.h>
#include <mruby/data.h>
#include <mruby/presym.h>
#include <mruby/array.h>
#include <mruby/hash.h>
static const mrb_code call_iseq[] = {
OP_CALL,
};
stati... | vuln | Safe | C/C++ |
static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
const int *const_args)
{
int c;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_I0, args[0]);
tcg_out32(s, JMPL | INSN_RD(TCG_REG_G0) | INSN_RS1(TCG_REG_I... | vuln | Vulnerable | C/C++ |
grantpt (int fd)
{
int retval = -1;
#ifdef PATH_MAX
char _buf[PATH_MAX];
#else
char _buf[512];
#endif
char *buf = _buf;
struct stat64 st;
if (__builtin_expect (pts_name (fd, &buf, sizeof (_buf), &st), 0))
{
int save_errno = errno;
/* Check, if the file descriptor is valid. pts_name return... | vuln | Vulnerable | Unknown |
function editClient() {
var elem = $(this).attr("id");
var tr = $(this).closest("tr");
var id = tr.attr("data-id");
var groups = tr.find("#multiselect_" + id).val();
var ip = utils.escapeHtml(tr.find("#ip_" + id).text());
var name = utils.escapeHtml(tr.find("#name_" + id).text());
var comment = utils.esca... | vuln | Safe | JavaScript |
static void buffer_pipe_buf_get(struct pipe_inode_info *pipe,
static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
if (ref->ref > INT_MAX/2)
return false;
ref->ref++;
return true;
} | vuln | Safe | C/C++ |
public boolean shouldRender() {
return shouldRender;
} | vuln | Vulnerable | Java |
final void setObject(CharSequence name, Object... values) {
final AsciiString normalizedName = HttpHeaderNames.of(name);
requireNonNull(values, "values");
final int h = normalizedName.hashCode();
final int i = index(h);
remove0(h, i, normalizedName);
for (Object v: valu... | vuln | Safe | Java |
/* global host */
/* eslint-disable block-spacing, no-multi-spaces, brace-style, no-array-constructor, new-cap, no-use-before-define */
'use strict';
// eslint-disable-next-line no-invalid-this, no-shadow
const global = this;
const local = host.Object.create(null);
local.Object = Object;
local.Array = Array;
local.R... | vuln | Safe | Python |
private Document parseXml(String xmlContent) {
try {
DocumentBuilder builder = XmlSecurity.getSecureDbf().newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xmlContent)));
document.getDocumentElement().normalize();
return document;
} catch (Exception e) {
throw... | vuln | Safe | Java |
processOctetMsgLen(const instanceConf_t *const inst, struct conn_wrkr_s *connWrkr, char ch)
{
DEFiRet;
if (connWrkr->parseState.inputState == eAtStrtFram) {
if (inst->bSuppOctetFram && isdigit(ch)) {
connWrkr->parseState.inputState = eInOctetCnt;
connWrkr->parseState.iOctetsRemain = 0;
connWrkr->parseState... | vuln | Vulnerable | Unknown |
int cg_write(const char *path, const char *buf, size_t size, off_t offset,
struct fuse_file_info *fi)
{
struct fuse_context *fc = fuse_get_context();
char *localbuf = NULL;
struct cgfs_files *k = NULL;
struct file_info *f = (struct file_info *)fi->fh;
bool r;
if (f->type != LXC_TYPE_CGFILE) {
fprintf(std... | vuln | Vulnerable | C/C++ |
znumicc_components(i_ctx_t * i_ctx_p)
{
ref * pnval;
ref * pstrmval;
stream * s;
int ncomps, expected = 0, code;
cmm_profile_t *picc_profile;
os_ptr op = osp;
check_type(*op, t_dictionary);
... | vuln | Vulnerable | C/C++ |
private GetDocumentResponse render(CAS aCas)
{
AnnotatorState aState = getModelObject();
return render(aCas, aState.getWindowBeginOffset(), aState.getWindowEndOffset(),
bratSerializer);
} | vuln | Safe | Java |
@Override
public void run() {
try {
final Context context = getContext();
final Resources res = getResources();
final Editable edit = getText();
final int dp3 = Helper.dp2pixels(context, 3);
final int dp24 = Helper.dp2pi... | vuln | Vulnerable | Java |
/*
* netbios.c
*
* Copyright (C) 2011-21 - ntop.org
* Copyright (C) 2009-11 - ipoque GmbH
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms... | vuln | Safe | C/C++ |
package com.bezman.servlet;
import org.json.simple.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotati... | vuln | Safe | Java |
static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
XWindows *windows,const CommandType command_type,Image **image,
MagickStatusType *state,ExceptionInfo *exception)
{
Image
*nexus;
MagickBooleanType
proceed;
MagickStatusType
status;
XTextProperty
window_name;
/... | vuln | Safe | Unknown |
bgp_open_receive (struct peer *peer, bgp_size_t size)
{
int ret;
u_char version;
u_char optlen;
u_int16_t holdtime;
u_int16_t send_holdtime;
as_t remote_as;
struct peer *realpeer;
struct in_addr remote_id;
int capability;
u_int8_t notify_data_remote_as[2];
u_int8_t notify_data_remote_id[4];
rea... | vuln | Safe | Unknown |
public void verifySignature(PublicKey clientPublicKey, List<HandshakeMessage> handshakeMessages)
throws HandshakeException {
try {
ThreadLocalSignature localSignature = signatureAndHashAlgorithm.getThreadLocalSignature();
Signature signature = localSignature.currentWithCause();
signature.initVerify(client... | vuln | Safe | Java |
/*
* Copyright 2000-2020 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | vuln | Vulnerable | Java |
protected void addThreeQuarterFloors(WorldGenLevel world, StructureFeatureManager manager, ChunkGenerator generator, Random decoRNG, BoundingBox sbb, int bottom, int top) {
int spacing = 5;
Rotation rotation = RotationUtil.ROTATIONS[(this.boundingBox.minY() + bottom) % 4];
if (bottom == 0) {
makeLargeStairsUp... | vuln | Vulnerable | Java |
static int DetectLuaSetup (DetectEngineCtx *de_ctx, Signature *s, const char *str)
{
DetectLuaData *lua = NULL;
SigMatch *sm = NULL;
/* First check if Lua rules are enabled, by default Lua in rules
* is disabled. */
int enabled = 0;
(void)ConfGetBool("security.lua.allow-rules", &enabled);
... | vuln | Safe | C/C++ |
static RzList /*<RzDebugMap *>*/ *__io_maps(RzDebug *dbg) {
RzList *list = rz_list_new();
char *str = dbg->iob.system(dbg->iob.io, "dm");
if (!str) {
rz_list_free(list);
return NULL;
}
char *ostr = str;
ut64 map_start, map_end;
char perm[32];
char name[512];
for (;;) {
char *nl = strchr(str, '\n');
if ... | vuln | Vulnerable | C/C++ |
int __kvm_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
int user_alloc)
{
int r;
gfn_t base_gfn;
unsigned long npages;
unsigned long i;
struct kvm_memory_slot *memslot;
struct kvm_memory_slot old, new;
struct kvm_memslots *slots, *old_memslots;
r = -EINVAL;
/* Gener... | vuln | Safe | Unknown |
set_routerstatus_from_routerinfo(routerstatus_t *rs,
routerinfo_t *ri, time_t now,
int naming, int listbadexits,
int listbaddirs, int vote_on_hsdirs)
{
int unstable_version =
!tor_version_as_new_as(ri->platform,"0.1... | vuln | Vulnerable | C/C++ |
find_file_name_in_path(
char_u *ptr,
int len,
int options,
long count,
char_u *rel_fname) // file we are searching relative to
{
char_u *file_name;
int c;
# if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
char_u *tofree = NULL;
# endif
if (len == 0)
return NULL;
# if defined(FEA... | vuln | Safe | Unknown |
public void cycle(boolean forwards) {
var allChildren = new ArrayList<Component>();
this.root.collectChildren(allChildren);
allChildren.removeIf(component -> !component.canFocus(Component.FocusSource.KEYBOARD_CYCLE));
if (allChildren.isEmpty()) return;
int index = allChildren.i... | vuln | Vulnerable | Java |
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
ExtendedAuthenticationToken token = (ExtendedAuthenticationToken) authentication;
IamAccount account = accountRepo.findByUsername(authentication.getName())
.orElseThrow(() -> new BadCredentialsE... | vuln | Safe | Java |
private static String topologicalNodeFromIidmBus(Bus b, CgmesExportContext context) {
return b != null ? context.getTopologicalNodesByBusViewBus(b.getId()).stream().findFirst().orElseThrow(PowsyblException::new).getCgmesId() : null;
} | vuln | Safe | Java |
/** @file read.c
* @brief Functions for reading and parsing of MOBI document
*
* Copyright (c) 2014 Bartek Fabiszewski
* http://www.fabiszewski.net
*
* This file is part of libmobi.
* Licensed under LGPL, either version 3, or any later.
* See <http://www.gnu.org/licenses/>
*/
#include <stdio.h>
#include <st... | vuln | Vulnerable | C/C++ |
/* Copyright (c) 2017 - 2022 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_varint.c -- routines dealing with IETF QUIC varint.
*/
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include "lsquic_byteswap.h"
#include "lsquic_varint.h"
/* Returns number of bytes read from p (1, 2, 4, or 8), or... | vuln | Safe | C/C++ |
static void
findfileconflicts_alias_cb(void *cbdatav, const char *fn, struct filelistinfo *info)
{
int isdir = S_ISDIR(info->mode);
struct cbdata *cbdata = cbdatav;
const char *dp;
Id idx, dirid;
Id hx, qx;
Hashval h, hh;
idx = cbdata->idx;
if (!info->dirlen)
return;
dp = fn + info->dirlen;
if... | vuln | Vulnerable | C/C++ |
@Override
@CheckPermissionByAccount(action = AuthorizationResourceAction.DESCRIBE_DATALAKE)
public List<CDPStructuredEvent> getAuditEvents(String environmentCrn, List<StructuredEventType> types, Integer page, Integer size) {
return sdxEventsService.getPagedDatalakeAuditEvents(environmentCrn, types, page... | vuln | Vulnerable | Java |
static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
{
int pid;
pid = filter->pid;
if (filter->type == MPEGTS_SECTION)
av_freep(&filter->u.section_filter.section_buf);
av_free(filter);
ts->pids[pid] = NULL; | vuln | Vulnerable | C/C++ |
@Override
public void analyze(ServerReport report) {
supportsLegacyPrf = report.getResult(TlsAnalyzedProperty.SUPPORTS_LEGACY_PRF) == TestResults.TRUE;
supportsSha256 = report.getResult(TlsAnalyzedProperty.SUPPORTS_SHA256_PRF) == TestResults.TRUE;
supportsSha384 = report.getResult(TlsAnalyze... | vuln | Safe | Java |
rndr_quote(struct buf *ob, const struct buf *text, void *opaque)
{
if (!text || !text->size)
return 0;
BUFPUTSL(ob, "<q>");
bufput(ob, text->data, text->size);
BUFPUTSL(ob, "</q>");
return 1;
} | vuln | Vulnerable | C/C++ |
static int dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr)
{
size_t frag_off, frag_len, msg_len;
msg_len = msg_hdr->msg_len;
frag_off = msg_hdr->frag_off;
frag_len = msg_hdr->frag_len;
/* sanity checking */
if ((frag_off + frag_len) > msg_len
|| msg_len > dtls1_max_... | vuln | Safe | Unknown |
static int ndp_sock_open(struct ndp *ndp)
{
int sock;
//struct icmp6_filter flt;
int ret;
int err;
int val;
sock = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
if (sock == -1) {
err(ndp, "Failed to create ICMP6 socket.");
return -errno;
}
val = 1;
ret = setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO,
... | vuln | Safe | Unknown |
PrintingContext::Result PrintingContext::AskUserForSettings(
HWND view,
int max_pages,
bool has_selection) {
DCHECK(!in_print_job_);
dialog_box_dismissed_ = false;
HWND window;
if (!view || !IsWindow(view)) {
// TODO(maruel): bug 1214347 Get the right browser window instead.
window = G... | vuln | Safe | C/C++ |
static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
format[MaxTextExtent],
keyword[MaxTextExtent],
tag[MaxTextExtent],
value[MaxTextExtent];
double
gamma;
Image
*image;
int
c;
MagickBooleanType
status,
value_expected;
register Quan... | vuln | Vulnerable | C/C++ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.