code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static void vnc_dpy_setdata(DisplayChangeListener *dcl,
DisplayState *ds)
{
VncDisplay *vd = ds->opaque;
qemu_pixman_image_unref(vd->guest.fb);
vd->guest.fb = pixman_image_ref(ds->surface->image);
vd->guest.format = ds->surface->format;
vnc_dpy_update(dcl, ds, 0, 0, ds_ge... | vuln | Vulnerable | C/C++ |
WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst)
{
void (*cb) (const SSL *ssl, int type, int val) = NULL;
#ifndef OPENSSL_NO_SCTP
if (SSL_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(s))) {
WORK_STATE ret;
ret = dtls_wait_for_dry(s);
if (ret != WORK_FINISHED_CONTINUE)
... | vuln | Safe | C/C++ |
@Override
protected void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
purchasedChecker.checkPurchases();
checkWebSocketClient();
checkBottomNavigationHeight();
updateMiniPlayerMargi... | vuln | Vulnerable | Java |
public static float getEstimatedHealthIncrement(ItemStack itemStack, FoodValues modifiedFoodValues, Player player)
{
if (!isFood(itemStack))
return 0;
if (!player.isHurt())
return 0;
FoodData stats = player.getFoodData();
Level world = player.getCommandSenderWorld();
int foodLevel = Math.min(stats.g... | vuln | Vulnerable | Java |
#include <qpdf/qpdf-config.h> // include first for large file support
#include <qpdf/QPDFWriter.hh>
#include <assert.h>
#include <qpdf/Pl_StdioFile.hh>
#include <qpdf/Pl_Count.hh>
#include <qpdf/Pl_Discard.hh>
#include <qpdf/Pl_RC4.hh>
#include <qpdf/Pl_AES_PDF.hh>
#include <qpdf/Pl_Flate.hh>
#include <qpdf/Pl_PNGFil... | vuln | Vulnerable | C/C++ |
static void MSLStartElement(void *context,const xmlChar *tag,
const xmlChar **attributes)
{
AffineMatrix
affine,
current;
ChannelType
channel;
char
key[MaxTextExtent],
*value;
const char
*attribute,
*keyword;
double
angle;
DrawInfo
*draw_info;
ExceptionInfo
... | vuln | Safe | Unknown |
pixHtmlViewer(const char *dirin,
const char *dirout,
const char *rootname,
l_int32 thumbwidth,
l_int32 viewwidth)
{
char *fname, *fullname, *outname;
char *mainname, *linkname, *linknameshort;
char *viewfile, *thumbfile;
char *shtm... | vuln | Safe | C/C++ |
package com.salesmanager.shop.admin.controller.shipping;
import com.salesmanager.core.business.services.reference.country.CountryService;
import com.salesmanager.core.business.services.reference.zone.ZoneService;
import com.salesmanager.core.business.services.shipping.ShippingOriginService;
import com.salesmanager.cor... | vuln | Safe | Java |
def api_endpoint(uri)
host = uri.host
begin
res = @dns.getresource "_rubygems._tcp.#{host}",
Resolv::DNS::Resource::IN::SRV
rescue Resolv::ResolvError => e
verbose "Getting SRV record failed: #{e}"
uri
else
target = res.target.to_s.strip
if /\... | vuln | Vulnerable | Ruby |
func SettingsEmailPost(c *context.Context, f form.AddEmail) {
c.Title("settings.emails")
c.PageIs("SettingsEmails")
// Make emailaddress primary.
if c.Query("_method") == "PRIMARY" {
if err := db.MakeEmailPrimary(c.UserID(), &db.EmailAddress{ID: c.QueryInt64("id")}); err != nil {
c.ServerError("MakeEmailPrima... | vuln | Safe | Go |
static int decode_iccp_chunk(PNGDecContext *s, int length, AVFrame *f)
{
int ret, cnt = 0;
uint8_t *data, profile_name[82];
AVBPrint bp;
AVFrameSideData *sd;
while ((profile_name[cnt++] = bytestream2_get_byte(&s->gb)) && cnt < 81);
if (cnt > 80) {
av_log(s->avctx, AV_LOG_ERROR, "iCCP wit... | vuln | Safe | C/C++ |
public static boolean canConvertBlock(Player player, Level level, BlockPos pos, BlockState state, int affected) throws LittleActionException {
if (LittleTiles.CONFIG.build.get(player).limitAffectedBlocks && LittleTiles.CONFIG.build.get(player).maxAffectedBlocks < affected)
throw new NotAllowedToConv... | vuln | Vulnerable | Java |
static void rc4030_dma_tt_write(void *opaque, hwaddr addr, uint64_t data,
unsigned int size)
{
rc4030State *s = opaque;
memcpy(memory_region_get_ram_ptr(&s->dma_tt) + addr, &data, size);
if (addr % sizeof(dma_pagetable_entry) == 0) {
int index = addr / sizeo... | vuln | Vulnerable | C/C++ |
static int hash__init_new_context(struct mm_struct *mm)
{
int index;
index = hash__alloc_context_id();
if (index < 0)
return index;
/*
* The old code would re-promote on fork, we don't do that when using
* slices as it could cause problem promoting slices that have been
* forced down to 4K.
*
* For bo... | vuln | Vulnerable | C/C++ |
dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
{
unsigned char wire[DTLS1_HM_HEADER_LENGTH];
unsigned long len, frag_off, frag_len;
int i,al;
struct hm_header_st msg_hdr;
/* see if we have the required fragment already */
if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *o... | vuln | Vulnerable | Unknown |
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t reg... | vuln | Safe | JavaScript |
'use strict';
var Utils = require('../../utils')
, SqlString = require('../../sql-string')
, Model = require('../../model')
, DataTypes = require('../../data-types')
, _ = require('lodash')
, util = require('util')
, Dottie = require('dottie')
, BelongsTo = require('../../associations/belongs-to')
, ... | vuln | Safe | JavaScript |
package com.salesmanager.shop.admin.controller.customers;
import com.salesmanager.core.business.services.customer.attribute.CustomerOptionValueService;
import com.salesmanager.core.business.services.reference.language.LanguageService;
import com.salesmanager.core.business.utils.ajax.AjaxResponse;
import com.salesmanag... | vuln | Vulnerable | Java |
void GpuCommandBufferStub::OnGetTransferBuffer(
int32 id,
IPC::Message* reply_message) {
if (command_buffer_.get()) {
base::SharedMemoryHandle transfer_buffer = base::SharedMemoryHandle();
uint32 size = 0;
gpu::Buffer buffer = command_buffer_->GetTransferBuffer(id);
if (buffer.shared_... | vuln | Safe | C/C++ |
@AttackVector(
vulnerabilityExposed = {
VulnerabilitySubType.UNRESTRICTED_FILE_UPLOAD,
VulnerabilitySubType.PERSISTENT_XSS,
VulnerabilitySubType.REFLECTED_XSS
},
description = "UNRESTRICTED_FILE_UPLOAD_IF_NOT_HTML_NOT_HTM_FILE_EXTENSION... | vuln | Safe | Java |
do_tabs(int *tab_list)
{
int last = 1;
int stop;
putchar('\r');
while ((stop = *tab_list++) > 0) {
if (last < stop) {
while (last++ < stop) {
if (last > max_cols)
break;
putchar(' ');
}
}
if (stop <= max_cols) {
tputs(TIPARM_1(set_tab, stop), 1, putch);
last = stop;
} ... | vuln | Safe | Unknown |
def redirect(redirect_path, redirect_params=None, **kw):
"""Redirect (via cherrypy.HTTPRedirect).
Raises the exception instead of returning it, this to allow
users to both call it as a function or to raise it as an exception.
"""
if not isinstance(redirect_path, basestring):
redirect_path ... | vuln | Safe | Python |
static ScriptPromise fulfillImageBitmap(ExecutionContext* context, PassRefPtrWillBeRawPtr<ImageBitmap> imageBitmap)
{
RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(context);
ScriptPromise promise = resolver->promise();
resolver->resolve(imageBitmap);
return promise;
} | vuln | Vulnerable | C/C++ |
TEST_F(OAuth2Test, OAuthBearerTokenFlowFromQueryParameters) {
Http::TestRequestHeaderMapImpl request_headers_before{
{Http::Headers::get().Path.get(), "/test?role=bearer&token=xyz-queryparam-token"},
{Http::Headers::get().Host.get(), "traffic.example.com"},
{Http::Headers::get().Method.get(), Http::... | vuln | Vulnerable | Unknown |
private void initialize(Cluster cluster, Configuration conf, boolean sslEnabled,
Optional<KeyStore> trustStore) {
this.cluster = cluster;
this.conf = conf;
this.sslEnabled = sslEnabled;
extraHeaders = new ConcurrentHashMap<>();
String clspath = System.getProperty("java.class.path");
LOG.de... | vuln | Safe | Java |
int object_property_get_enum(Object *obj, const char *name,
const char *strings[], Error **errp)
{
StringOutputVisitor *sov;
StringInputVisitor *siv;
int ret;
sov = string_output_visitor_new(false);
object_property_get(obj, string_output_get_visitor(sov), name, errp);
... | vuln | Vulnerable | C/C++ |
public static boolean saveLinkList(Map<String, PortletInstitution> portletMap){
XStreamHelper.writeObject(xstream, fxConfXStreamFile, portletMap);
return true;
} | vuln | Safe | Java |
header_put_be_8byte (SF_PRIVATE *psf, sf_count_t x)
{ if (psf->headindex < SIGNED_SIZEOF (psf->header) - 8)
{ psf->header [psf->headindex++] = 0 ;
psf->header [psf->headindex++] = 0 ;
psf->header [psf->headindex++] = 0 ;
psf->header [psf->headindex++] = 0 ;
psf->header [psf->headindex++] = (x >> 24) ;
psf->h... | vuln | Vulnerable | C/C++ |
static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, int *pnum)
{
BDRVParallelsState *s = bs->opaque;
int64_t pos, space, idx, to_allocate, i;
pos = block_status(s, sector_num, nb_sectors, pnum);
if (pos > 0) {
return pos;
... | vuln | Safe | C/C++ |
/*
* Copyright (C) 2020 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_uri_parser
* @{
*
* @file
* @brief A minimal, non-destructive URI parse... | vuln | Safe | C/C++ |
private static @Nullable Integer tryEvaluateExpression(CExpression e) {
if (e instanceof CIntegerLiteralExpression) {
return ((CIntegerLiteralExpression) e).getValue().intValue();
}
return null;
} | vuln | Vulnerable | Java |
def device_login(self, scopes: List[str]) -> Any:
if not self.app:
self.app = msal.PublicClientApplication(
self.config.client_id,
authority=self.config.authority,
token_cache=self.token_cache,
)
accounts = self.app.get_accounts()
... | vuln | Vulnerable | Python |
private static Optional<IdentityProviderModel> discoverHomeIdp(
AuthenticationFlowContext context, String domain, UserModel user, String username) {
final Map<String, String> linkedIdps;
HomeIdpDiscoveryConfig config = new HomeIdpDiscoveryConfig(context.getAuthenticatorConfig());
if (user == null || ... | vuln | Vulnerable | Java |
public void readMap(DataTypeProvider provider) {
executor.execute(() -> attempt(() -> {
int mapId = provider.readVarInt();
this.updatedSince.add(mapId);
if (mapId > maxMapId) {
maxMapId = mapId;
}
PlayerMap map = maps.computeIfAbsent(m... | vuln | Safe | Java |
dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_type h)
{
uint8_t labuf[LDNS_MAX_LABELLEN+1];
uint8_t lablen;
int i;
/* preserve case of query, make hash label by label */
lablen = *dname++;
while(lablen) {
if(LABEL_IS_PTR(lablen)) {
/* follow pointer */
dname = sldns_buffer_at(pkt, PTR_OFFSE... | vuln | Vulnerable | Unknown |
package bitswap
import (
"time"
delay "github.com/ipfs/go-ipfs-delay"
"github.com/ipfs/go-libipfs/bitswap/client"
"github.com/ipfs/go-libipfs/bitswap/server"
"github.com/ipfs/go-libipfs/bitswap/tracer"
)
type option func(*Bitswap)
// Option is interface{} of server.Option or client.Option or func(*Bitswap)
// ... | vuln | Safe | Go |
SPL_METHOD(SplFileObject, fwrite)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
char *str;
int str_len;
long length = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len, &length) == FAILURE) {
return;
}
if (ZEND_NUM_ARG... | vuln | Vulnerable | C/C++ |
@Override
public @NonNull ParceledListSlice<IntentFilter> getAllIntentFilters(String packageName) {
if (TextUtils.isEmpty(packageName)) {
return ParceledListSlice.emptyList();
}
final int callingUid = Binder.getCallingUid();
final int callingUserId = UserHandle.getUserId(... | vuln | Vulnerable | Java |
static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *address)
{
GSList *tmp;
GString *cmd;
char *params, *evt, *list, *star, **caps;
int i, caps_length, disable, avail_caps, multiline;
params = event_get_params(args, 4, NULL, &evt, &star, &list);
if (params == NULL)
return;
/* Multili... | vuln | Safe | C/C++ |
static int qcow2_set_up_encryption(BlockDriverState *bs, const char *encryptfmt,
QemuOpts *opts, Error **errp)
{
BDRVQcow2State *s = bs->opaque;
QCryptoBlockCreateOptions *cryptoopts = NULL;
QCryptoBlock *crypto = NULL;
int ret = -EINVAL;
QDict *options, *encryptop... | vuln | Vulnerable | C/C++ |
hex_encode (const unsigned char *data,
size_t n_data)
{
char *result;
size_t i;
size_t o;
if ((SIZE_MAX - 1) / 3 < n_data)
return NULL;
result = malloc (n_data * 3 + 1);
if (result == NULL)
return NULL;
for (i = 0, o = 0; i < n_data; i++) {
if (i > 0)
result[o++] = ':';
result[o++] = HEX... | vuln | Safe | Unknown |
private Boolean checkInsertedEntityAlreadyExists(Handle handle, ExperimentRun experimentRun) {
String queryStr =
"SELECT count(id) FROM experiment_run WHERE "
+ " name = :experimentRunName "
+ " AND project_id = :projectId "
+ " AND experiment_id = :experimentId "
... | vuln | Vulnerable | Java |
package extractor
import (
"archive/tar"
"compress/gzip"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
)
type tgzExtractor struct{}
func NewTgz() Extractor {
return &tgzExtractor{}
}
func (e *tgzExtractor) Extract(src, dest string) error {
srcType, err := mimeType(src)
if err != nil {
return err
}
switch... | vuln | Vulnerable | Go |
static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
AVFormatContext *fmt_ctx)
{
AVBPrint pbuf;
char val_str[128];
const char *s;
int i;
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
writer_print_section_header(w, SECTION_ID_FRAME);
s = a... | vuln | Vulnerable | Unknown |
function processUrl(url: string): void {
if (!global.mainWindow) return;
const parsed = new URL(url);
// sanity check: we only register for the one protocol, so we shouldn't
// be getting anything else unless the user is forcing a URL to open
// with the Element app.
if (parsed.protocol !== PRO... | vuln | Safe | JavaScript |
static Image *ReadSCREENSHOTImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
assert(exception !... | vuln | Safe | C/C++ |
public String getCsvLine() {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return String.format("\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"%n", path.getAbsolutePath(), entry, product,
version, cve, status, fixed ? "FIXED" : "", df.format(reportTime), error != null ? error : "")... | vuln | Vulnerable | Java |
OMX_ERRORTYPE SoftAVCEncoder::internalSetParameter(
OMX_INDEXTYPE index, const OMX_PTR params) {
int32_t indexFull = index;
switch (indexFull) {
case OMX_IndexParamVideoBitrate:
{
OMX_VIDEO_PARAM_BITRATETYPE *bitRate =
(OMX_VIDEO_PARAM_BITRATETYPE *) params;
if ... | vuln | Safe | C/C++ |
static void virtio_net_handle_tx_bh(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIONet *n = to_virtio_net(vdev);
if (unlikely(n->tx_waiting)) {
return;
}
n->tx_waiting = 1;
if (!n->vm_running) {
return;
}
virtio_queue_set_notification(vq, 0);
qemu_bh_schedule(n->tx_bh);
... | vuln | Safe | C/C++ |
private void saveMessage(GUIMessage message, Session session, long recipientId) throws ServerException {
Context context = Context.get();
SystemMessageDAO dao = (SystemMessageDAO) context.getBean(SystemMessageDAO.class);
UserDAO uDao = (UserDAO) context.getBean(UserDAO.class);
try {
User user = uDao.findByI... | vuln | Vulnerable | Java |
static void encode_share_access(struct xdr_stream *xdr, int open_flags)
{
__be32 *p;
RESERVE_SPACE(8);
switch (open_flags & (FMODE_READ|FMODE_WRITE)) {
case FMODE_READ:
WRITE32(NFS4_SHARE_ACCESS_READ);
break;
case FMODE_WRITE:
WRITE32(NFS4_SHARE_ACCESS_WRITE);
break;
case FMODE_READ|FMODE_W... | vuln | Vulnerable | Unknown |
Cluster* Cluster::Create(Segment* pSegment, long idx, long long off)
{
assert(pSegment);
assert(off >= 0);
const long long element_start = pSegment->m_start + off;
Cluster* const pCluster = new Cluster(pSegment, idx, element_start);
assert(pCluster);
return pCluster;
} | vuln | Vulnerable | C/C++ |
@Override
public int spread(SculkSpreadManager.Cursor cursor, WorldAccess world, BlockPos catalystPos, AbstractRandom random, SculkSpreadManager spreadManager, boolean shouldConvertToBlock) {
int i = cursor.getCharge();
if (i != 0 && random.nextInt(1) == 0) {
BlockPos blockPos = cursor.g... | vuln | Safe | Java |
bool MYSQL_LOG::open(
#ifdef HAVE_PSI_INTERFACE
PSI_file_key log_file_key,
#endif
const char *log_name, enum_log_type log_type_arg,
const char *new_name, enum cache_type io_cache_type_arg)
{
char buff[FN_REFLEN];
MY_STAT f_stat;
File file= -1;
int o... | vuln | Safe | Unknown |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Vulnerable | C/C++ |
static float *get_window(vorb *f, int len)
{
len <<= 1;
if (len == f->blocksize_0) return f->window[0];
if (len == f->blocksize_1) return f->window[1];
return NULL;
} | vuln | Safe | C/C++ |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | vuln | Safe | Java |
smb_fdata(netdissect_options *ndo,
const u_char *buf, const char *fmt, const u_char *maxbuf,
int unicodestr)
{
static int depth = 0;
char s[128];
char *p;
while (*fmt) {
switch (*fmt) {
case '*':
fmt++;
while (buf < maxbuf) {
const u_char *buf2;
depth++;
buf2 = ... | vuln | Vulnerable | C/C++ |
function html_show_tabs_left() {
global $config, $tabs_left;
if (is_realm_allowed(8)) {
$show_console_tab = true;
} else {
$show_console_tab = false;
}
if (get_selected_theme() == 'classic') {
if ($show_console_tab == true) {
?><a <?php print (is_console_page(get_current_page()) ? " id='maintab-anchor" ... | vuln | Vulnerable | PHP |
void ff_eval_coefs(int *coefs, const int *refl)
{
int buffer[LPC_ORDER];
int *b1 = buffer;
int *b2 = coefs;
int i, j;
for (i=0; i < LPC_ORDER; i++) {
b1[i] = refl[i] * 16;
for (j=0; j < i; j++)
b1[j] = ((refl[i] * b2[i-j-1]) >> 12) + b2[j];
FFSWAP(int *, b1, b2);
... | vuln | Vulnerable | C/C++ |
async def _process_event_queue_loop(self) -> None:
try:
self._is_processing = True
while True:
last_token = await self.store.get_federation_out_pos("events")
next_token, events = await self.store.get_all_new_events_stream(
last_token, s... | vuln | Safe | Python |
void ion_free(struct ion_client *client, struct ion_handle *handle)
{
bool valid_handle;
BUG_ON(client != handle->client);
mutex_lock(&client->lock);
valid_handle = ion_handle_validate(client, handle);
if (!valid_handle) {
WARN(1, "%s: invalid handle passed to free.\n", __func__);
mutex_unlock(&client->lock... | vuln | Vulnerable | Unknown |
private int getIntelligencePoints(ItemStack stack) {
String lore = TextFormatting.getTextWithoutFormattingCodes(ItemUtils.getStringLore(stack));
int start = lore.indexOf(" points ") - 3;
return Integer.parseInt(lore.substring(start, start + 3).trim());
} | vuln | Vulnerable | Java |
/*
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
*
* Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http... | vuln | Safe | C/C++ |
package com.dimtion.shaarlier;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.List;
/**
* Created by dimtion on 12/05/2015.
* Inte... | vuln | Safe | Java |
static Image *ReadJBIGImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
IndexPacket
index;
MagickStatusType
status;
register IndexPacket
*indexes;
register ssize_t
x;
register PixelPacket
*q;
register unsigned char
*p;
ssize_t
length,
... | vuln | Vulnerable | C/C++ |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Safe | C/C++ |
package com.salesmanager.shop.model.catalog.product.attribute;
import java.util.ArrayList;
import java.util.List;
import com.salesmanager.shop.model.catalog.product.attribute.api.ReadableProductOptionValueEntity;
public class ReadableProductOption extends ProductOption {
/**
*
*/
private static final long se... | vuln | Vulnerable | Java |
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Update Data PDUs
*
* 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");
* ... | vuln | Vulnerable | C/C++ |
/**
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
//Add a closure to hide the class private variables without changing the code a lot
(function ()
{
var _token = null;
window.GitHubClient = function(editorUi, authName)
{
DrawioClient.call(this, editorUi, authName || 'ghauth');
... | vuln | Vulnerable | JavaScript |
public void writePacket(byte[] buffer, int count); | vuln | Vulnerable | Java |
protected void checkOther(Map<String, String> other) {
if (MapUtils.isEmpty(other)) {
return;
}
if (!Sets.intersection(other.keySet(), POSSIBLE_MALICIOUS_KEYS).isEmpty()) {
throw new IllegalArgumentException("Other params include possible malicious keys.");
}
... | vuln | Safe | Java |
private void sendHighlight(HttpServletRequest request, HttpServletResponse response, String brushType, String brush,
String core, String theme, String content) throws ServletException, IOException {
ServletContext sc = getServletContext();
sc.setAttribute("brushType", brushType);
sc.se... | vuln | Safe | Java |
import { BehaviorSubject } from 'rxjs';
import { history, handleResponse } from '@/_helpers';
import config from 'config';
const currentUserSubject = new BehaviorSubject(JSON.parse(localStorage.getItem('currentUser')));
export const authenticationService = {
login,
logout,
signup,
updateCurrentUserDetails,
... | vuln | Safe | JavaScript |
public static MutableText setHighlightChatMessage(String key, MutableText message, boolean watsonMessage)
{
final String[] user = {""};
StringBuilder textChat = new StringBuilder();
final int[] i = {0};
MutableText endMessage;
if (!watsonMessage)
{
message... | vuln | Vulnerable | Java |
def create_edit_shelf(shelf, page_title, page, shelf_id=False):
sync_only_selected_shelves = current_user.kobo_only_shelves_sync
# calibre_db.session.query(ub.Shelf).filter(ub.Shelf.user_id == current_user.id).filter(ub.Shelf.kobo_sync).count()
if request.method == "POST":
to_save = request.form.to_... | vuln | Safe | Python |
xmlParseReference(xmlParserCtxtPtr ctxt) {
xmlEntityPtr ent;
xmlChar *val;
int was_checked;
xmlNodePtr list = NULL;
xmlParserErrors ret = XML_ERR_OK;
if (RAW != '&')
return;
/*
* Simple case of a CharRef
*/
if (NXT(1) == '#') {
int i = 0;
xmlChar out[10];
int hex ... | vuln | Safe | Unknown |
static MagickBooleanType WriteVIDEOImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
char
basename[MagickPathExtent],
filename[MagickPathExtent];
const char
*intermediate_format;
const DelegateInfo
*delegate_info;
double
delay;
Image
*clone_images;
Im... | vuln | Safe | C/C++ |
@Override
public void complete(ScanRequest request, ScanResults results) throws MachinaException {
try {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
if(request != null && results != null) {
mapp... | vuln | Safe | Java |
rsvg_filter_parse (const RsvgDefs * defs, const char *str)
{
char *name;
name = rsvg_get_url_string (str);
if (name) {
RsvgNode *val;
val = rsvg_defs_lookup (defs, name);
g_free (name);
if (val && RSVG_NODE_TYPE (val) == RSVG_NODE_TYPE_FILTER)
return (RsvgFilter... | vuln | Safe | Unknown |
/* radare - LGPL - Copyright 2019-2022 - GustavoLCR */
#include "ne.h"
#define NE_BUG 0
static char *__get_target_os(r_bin_ne_obj_t *bin) {
switch (bin->ne_header->targOS) {
case 1:
return "OS/2";
case 2:
return "Windows";
case 3:
return "European MS-DOS 4.x";
case 4:
return "Windows 386";
case 5:
ret... | vuln | Vulnerable | C/C++ |
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.preferences_backup_restore, rootKey);
getPreferenceManager().setPreferenceDataStore(new SettingsDataStore());
activity = (SettingsActivity) requireActivity();
// Ba... | vuln | Vulnerable | Java |
(function()
{
// Adds ArchiMate 2.1 shapes
Sidebar.prototype.addArchiMatePalette = function()
{
var w = 100;
var h = 75;
var s = 'html=1;outlineConnect=0;shape=mxgraph.archimate.';
var am1 = 'html=1;outlineConnect=0;whiteSpace=wrap;fillColor=#ffff99;shape=mxgraph.archimate.';
var am2 = 'html=1;outlineConne... | vuln | Vulnerable | Java |
@Override
public void push(int integer) {
checkStack(1);
C.lua_pushinteger(L, integer);
} | vuln | Safe | Java |
void sendInvitationEmail(
String email, KeycloakSession session, RealmModel realm, UserModel inviter) throws Exception {
EmailTemplateProvider emailTemplateProvider = session.getProvider(EmailTemplateProvider.class);
Method sendMethod =
FreeMarkerEmailTemplateProvider.class.getDeclaredMethod(
... | vuln | Safe | Java |
private void handleSaslToken(ChannelHandlerContext ctx,
ByteBuf requestBuf,
BiConsumer<Long, Throwable> registerRequestParseLatency,
BiConsumer<String, Long> registerRequestLatency)
throws AuthenticationExcept... | vuln | Vulnerable | Java |
static av_cold int shorten_decode_close(AVCodecContext *avctx)
{
ShortenContext *s = avctx->priv_data;
int i;
for (i = 0; i < s->channels; i++) {
s->decoded[i] -= s->nwrap;
av_freep(&s->decoded[i]);
av_freep(&s->offset[i]);
}
av_freep(&s->bitstream);
av_freep(&s->coeffs);... | vuln | Vulnerable | C/C++ |
service_info *FindServiceEventURLPath(
service_table *table, const char *eventURLPath)
{
service_info *finger = NULL;
uri_type parsed_url;
uri_type parsed_url_in;
if (table &&
parse_uri(eventURLPath, strlen(eventURLPath), &parsed_url_in) ==
HTTP_SUCCESS) {
finger = table->serviceList;
while (finger) {
... | vuln | Vulnerable | C/C++ |
@Override
public void handleChat(@NotNull Player p, @NotNull String msg) {
if (!plugin.getShopManager().getActions().containsKey(p.getUniqueId())) {
return;
}
String message = net.md_5.bungee.api.ChatColor.stripColor(msg);
message = ChatColor.stripColor(message);
... | vuln | Safe | Java |
static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
if (nb_sectors > INT_MAX / BDRV_SECTOR_SIZE) {
return -EIO;
}
return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE,
nb_sectors *... | vuln | Safe | C/C++ |
package za.org.grassroot.webapp.controller.rest.authentication;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.validator.routines.EmailValidator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframewo... | vuln | Vulnerable | Java |
'use strict';
// @ts-check
// ==================================================================================
// internet.js
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
// Copyright: (c) 2014 - ... | vuln | Safe | JavaScript |
public BinaryContentExporterData exportContent(File file, final Map<String, String[]> parameters)
throws BinaryContentExporterException {
Class<ImageFilter> errorClass = ImageFilter.class;
try {
final Map<String,Class<ImageFilter>> filters = new ImageFilterApiImpl().res... | vuln | Safe | Java |
send_ldap_result_ext(
Slapi_PBlock *pb,
int err,
char *matched,
char *text,
int nentries,
struct berval **urls,
BerElement *ber)
{
Slapi_Operation *operation;
passwdPolicy *pwpolicy = NULL;
Connection *conn = NULL;
Slapi_DN *sdn = NULL;
const char *dn = NULL;
ber_tag_... | vuln | Safe | Unknown |
@Override
protected Category findByName(final String name) throws DotDataException {
if(null==name) {
return null;
}
final List<Map<String, Object>> result = new DotConnect()
.setSQL(" SELECT * FROM category WHERE category_name = lower(?)")
.addParam(name.toLowerCase())
.loadObjectResu... | vuln | Safe | Java |
static bool CheckMov(const uint8* buffer, int buffer_size) {
RCHECK(buffer_size > 8);
int offset = 0;
while (offset + 8 < buffer_size) {
int atomsize = Read32(buffer + offset);
uint32 atomtype = Read32(buffer + offset + 4);
switch (atomtype) {
case TAG('f','t','y','p'):
case TAG('p',... | vuln | Vulnerable | C/C++ |
xsltCopyOf(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltStylePreCompPtr castedComp) {
#ifdef XSLT_REFACTORED
xsltStyleItemCopyOfPtr comp = (xsltStyleItemCopyOfPtr) castedComp;
#else
xsltStylePreCompPtr comp = castedComp;
#endif
xmlXPathObjectPtr res = NULL;
xmlNodeSe... | vuln | Vulnerable | C/C++ |
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/ory/fosite/handler/oauth2 (interfaces: ResourceOwnerPasswordCredentialsGrantStorage)
// Package internal is a generated GoMock package.
package internal
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
fosite "gi... | vuln | Safe | Go |
/*
* GPAC - Multimedia Framework C SDK
*
* Authors: Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2000-2021
* All rights reserved
*
* This file is part of GPAC / MPEG-4 visual p2 xvid decoder filter
*
* GPAC is free software; you can redistribute it and/or modify
* it under the terms of the GN... | vuln | Safe | C/C++ |
/* -*- coding: utf-8 -*- */
/* Copyright (C) 2000-2012 by George Williams */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of ... | vuln | Vulnerable | C/C++ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.