code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
public void setWatcherDivision(String[] watcherDivision) {
this.watcherDivision = watcherDivision;
} | vuln | Vulnerable | Java |
int
yyparse (void *yyscanner, YR_COMPILER* compiler)
{
/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_... | vuln | Vulnerable | Unknown |
PS_CREATE_SID_FUNC(files)
{
char *sid;
int maxfail = 3;
PS_FILES_DATA;
do {
sid = php_session_create_id((void **)&data, newlen TSRMLS_CC);
/* Check collision */
if (ps_files_key_exists(data, sid TSRMLS_CC) == SUCCESS) {
if (sid) {
efree(sid);
sid = NULL;
}
if (!(maxfail--)) {
return NULL... | vuln | Vulnerable | Unknown |
AVIOContext *avio_alloc_context(
unsigned char *buffer,
int buffer_size,
int write_flag,
void *opaque,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
int (*write_packet)(void *opaque, uint8_t *buf,... | vuln | Vulnerable | C/C++ |
@GET
@Produces(APPLICATION_JSON)
@Path("/{subscriptionName}/undelivered/last")
@ApiOperation(value = "Get latest undelivered message", response = SentMessageTrace.class, httpMethod = HttpMethod.GET)
public Response getLatestUndeliveredMessage(@PathParam("topicName") String qualifiedTopicName,
... | vuln | Vulnerable | Java |
static void new_audio_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
AVOutputStream *ost;
AVCodec *codec= NULL;
AVCodecContext *audio_enc;
enum CodecID codec_id;
st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
if (!st) {
fprintf... | vuln | Vulnerable | C/C++ |
/*
Mac-Telnet - Connect to RouterOS or mactelnetd devices via MAC address
Copyright (C) 2010, Håkon Nessjøen <haakon.nessjoen@gmail.com>
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 Founda... | vuln | Safe | C/C++ |
/*
* GPAC - Multimedia Framework C SDK
*
* Authors: Romain Bouqueau, Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2018-2021
* All rights reserved
*
* This file is part of GPAC / AV1 IVF/OBU/annexB reframer filter
*
* GPAC is free software; you can redistribute it and/or modify
* it under the ... | vuln | Safe | C/C++ |
/**
* @file atecc608a-tnglora-se.c
*
* @brief ATECC608A-TNGLORA Secure Element hardware implementation
*
* @remark Current implementation only supports LoRaWAN 1.0.x version
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
* Revised BSD License
* Copyright The Things Industries B.V 2... | vuln | Vulnerable | C/C++ |
opj_image_t* bmptoimage(const char *filename, opj_cparameters_t *parameters)
{
opj_image_cmptparm_t cmptparm[4]; /* maximum of 4 components */
OPJ_UINT8 lut_R[256], lut_G[256], lut_B[256];
OPJ_UINT8 const* pLUT[3];
opj_image_t * image = NULL;
FILE *IN;
OPJ_BITMAPFILEHEADER File_h;
OPJ_BITMAPINFOHEADER Info_h;
O... | vuln | Safe | C/C++ |
function v(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return O(this,t,n);case"latin1":case... | vuln | Safe | JavaScript |
static u32 read_32(cdk_stream_t s)
{
byte buf[4];
size_t nread = 0;
assert(s != NULL);
stream_read(s, buf, 4, &nread);
if (nread != 4)
return (u32) -1;
return buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
} | vuln | Safe | Unknown |
public static List<PGPSignature> readSignatures(InputStream inputStream, int maxIterations) throws IOException, PGPException {
List<PGPSignature> signatures = new ArrayList<>();
InputStream pgpIn = ArmorUtils.getDecoderStream(inputStream);
PGPObjectFactory objectFactory = ImplementationFactory.g... | vuln | Safe | Java |
static UINT printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
{
UINT32 Length;
UINT64 Offset;
rdpPrintJob* printjob = NULL;
UINT error = CHANNEL_RC_OK;
void* ptr;
if (Stream_GetRemainingLength(irp->input) < 32)
return ERROR_INVALID_DATA;
Stream_Read_UINT32(irp->input, Length);
Stream_Read_UINT... | vuln | Safe | Unknown |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["jSuites"] = factory();
else
root["jSuit... | vuln | Safe | JavaScript |
void bn_lsh(bn_t c, const bn_t a, unsigned int bits) {
int digits;
dig_t carry;
bn_copy(c, a);
RLC_RIP(bits, digits, bits);
RLC_TRY {
bn_grow(c, c->used + digits + (bits > 0));
c->used = a->used + digits;
c->sign = a->sign;
if (digits > 0) {
dv_lshd(c->dp, a->dp, c->used, digits);
}
if (bits > ... | vuln | Safe | C/C++ |
static void l2cap_sock_destruct(struct sock *sk)
{
BT_DBG("sk %p", sk);
if (l2cap_pi(sk)->chan) {
l2cap_pi(sk)->chan->data = NULL;
l2cap_chan_put(l2cap_pi(sk)->chan);
}
if (l2cap_pi(sk)->rx_busy_skb) {
kfree_skb(l2cap_pi(sk)->rx_busy_skb);
l2cap_pi(sk)->rx_busy_skb = NULL;
}
skb_queue_purge(&sk->sk_rec... | vuln | Safe | Unknown |
@Override
public World createWorld(WorldCreator creator) {
Preconditions.checkState(!console.levels.isEmpty(), "Cannot create additional worlds on STARTUP");
Validate.notNull(creator, "Creator may not be null");
String name = creator.name();
ChunkGenerator generator = creator.genera... | vuln | Vulnerable | 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 |
@mod.route('/edit', methods=['GET', 'POST'])
def edit():
cursor.execute("SELECT * FROM users where email = %s;", (session['logged_email'],))
u = cursor.fetchone()
if request.method == 'POST':
cursor.execute("UPDATE users SET nickname = %s where email = %s", (request.form['nickname'], session['logged... | vuln | Safe | Python |
static int vdpau_frames_init(AVHWFramesContext *ctx)
{
VDPAUDeviceContext *device_priv = ctx->device_ctx->internal->priv;
VDPAUFramesContext *priv = ctx->internal->priv;
int i;
for (i = 0; i < FF_ARRAY_ELEMS(vdpau_pix_fmts); i++) {
if (vdpau_pix_fmts[i].frames_sw_format == ctx->sw_format)... | vuln | Safe | C/C++ |
static AVFilterContext *create_filter_with_args(const char *filt, void *opaque)
{
AVFilterContext *ret;
char *filter = av_strdup(filt);
char *name, *args;
name = filter;
if((args = strchr(filter, '='))) {
if(args == filter)
goto fail;
*args ++ = 0;
}
av_... | vuln | Vulnerable | C/C++ |
static bool check_transfer_bounds(struct vrend_resource *res,
const struct vrend_transfer_info *info)
{
int lwidth, lheight;
/* check mipmap level is in bounds */
if (info->level > res->base.last_level)
return false;
if (info->box->x < 0 || info->box->y < 0)
re... | vuln | Safe | Unknown |
@GetMapping("/avatar")
public void avatar(@RequestParam(required = false) String url,
HttpServletRequest req, HttpServletResponse res, Model model) {
HttpUtils.getAvatar(url, req, res);
} | vuln | Vulnerable | Java |
void ParamTraits<SkBitmap>::Write(base::Pickle* m, const SkBitmap& p) {
WriteParam(m, p.info());
size_t pixel_size = p.computeByteSize();
m->WriteData(reinterpret_cast<const char*>(p.getPixels()),
static_cast<int>(pixel_size));
} | vuln | Safe | C/C++ |
@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
public void onGuiChat(ClientChatReceivedEvent e) {
if(e.type == 2) {
CrystalMetalDetectorSolver.process(e.message);
e.message = processChatComponent(e.message);
return;
}
DungeonWin.onC... | vuln | Safe | Java |
static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
const BYTE* pSrcData, UINT32 DstWidth, UINT32 DstHeight,
UINT32 bpp, UINT32 length, BOOL compressed,
UINT32 codecId)
{
UINT32 SrcSize = lengt... | vuln | Safe | Unknown |
public function checkForReassign($operator)
{
$operator_name = ($this->locale == get_home_locale())
? $operator['vclocalename']
: $operator['vccommonname'];
$is_operator_correct = $this->nextAgent == $operator['operatorid']
|| $this->agentId == $operator['operato... | vuln | Vulnerable | PHP |
static gg_action_t gg_handle_tls_negotiation(struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
{
int valid_hostname = 0;
#ifdef GG_CONFIG_HAVE_GNUTLS
unsigned int status;
int res;
gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd() ... | vuln | Safe | C/C++ |
__alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
struct alloc_context *ac)
{
bool can_direct_reclaim = gfp_mask & __GFP_DIRECT_RECLAIM;
const bool costly_order = order > PAGE_ALLOC_COSTLY_ORDER;
struct page *page = NULL;
unsigned int alloc_flags;
unsigned long did_some_progress;
enum compact_prior... | vuln | Vulnerable | Unknown |
private synchronized void findAConnection() throws InterruptedException {
boolean success = false;
AbstractClientConnectionFactory lastFactoryToTry = this.currentFactory;
AbstractClientConnectionFactory nextFactory = null;
if (!this.factoryIterator.hasNext()) {
this.factoryIterator = this.connectionFact... | vuln | Vulnerable | Java |
public static List<String> getResourceAsLines(String path) {
BleachLogger.logger.info("Getting Resource (/" + path + ")");
Stream<String> response = sendRequest(resourceUrl.resolve(path), "GET", null, 5000, BodyHandlers.ofLines());
return response != null ? response.collect(Collectors.toList()) : null;
} | vuln | Safe | Java |
StartupXLOG(void)
{
XLogCtlInsert *Insert;
CheckPoint checkPoint;
bool wasShutdown;
bool reachedStopPoint = false;
bool haveBackupLabel = false;
XLogRecPtr RecPtr,
checkPointLoc,
EndOfLog;
XLogSegNo endLogSegNo;
TimeLineID PrevTimeLineID;
XLogRecord *record;
TransactionId oldestActiveXID;
bool ba... | vuln | Vulnerable | Unknown |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Vulnerable | C/C++ |
public static function BBCode2Html($text) {
$text = trim($text);
$text = self::parseEmoji($text);
// Smileys to find...
$in = array(
);
// And replace them by...
$out = array(
);
$in[] = '[/*]';
$in[] = '[*]';
$out[] = '</li>';
$out[] = ... | vuln | Vulnerable | PHP |
- (id <WOActionResults>) viewAction
{
WOResponse *result;
NSDictionary *data;
NSCalendarDate *eventStartDate, *eventEndDate;
NSTimeZone *timeZone;
SOGoUserDefaults *ud;
SOGoCalendarComponent *co;
NSString *created_by;
BOOL resetAlarm;
unsigned int snoozeAlarm;
[self event];
result = [self respo... | vuln | Safe | JavaScript |
@Override
protected void complexUpdate(SharedPreferences sharedPreferences, String key) {
switch (key) {
case PreferencesKeys.KEY_SET_COMM_DEVICE:
String commDeviceStr = sharedPreferences.getString(PreferencesKeys.KEY_SET_COMM_DEVICE, PreferencesDefaults.DEFAULT_COMM_DEVICE);
... | vuln | Safe | Java |
@Inject(at = @At("HEAD"), method = "onPress")
private void onMouseButton(long window, int button, int action, int mods, CallbackInfo ci) {
if (action == 1) {
VoiceClient.getClientConfig().keyBindings.onKeyDown(InputConstants.Type.MOUSE.getOrCreate(button));
} else if (action == 0) {
... | vuln | Vulnerable | Java |
/*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... | vuln | Safe | Java |
int qcow2_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
{
BDRVQcowState *s = bs->opaque;
QEMUSnapshotInfo *sn_tab, *sn_info;
QCowSnapshot *sn;
int i;
if (!s->nb_snapshots) {
*psn_tab = NULL;
return s->nb_snapshots;
}
sn_tab = g_new0(QEMUSnapshotInfo, s->nb_s... | vuln | Safe | C/C++ |
ArgParser::handleBashArguments()
{
// Do a minimal job of parsing bash_line into arguments. This
// doesn't do everything the shell does (e.g. $(...), variable
// expansion, arithmetic, globs, etc.), but it should be good
// enough for purposes of handling completion. As we build up the
// new argv,... | vuln | Safe | Unknown |
def GetActionAllowAnyone(f: GetRequest => Result): Action[Unit] =
PlainApiAction(cc.parsers.empty, NoRateLimits, allowAnyone = true)(f) | vuln | Vulnerable | Scala |
def _unpack_uploaded_tarball(path, target):
with tarfile.open(path, "r") as tar:
# sanity check
for info in tar.getmembers():
_validate_tar_info(info, target)
# unpack everything
tar.extractall(target) | vuln | Safe | Python |
int getCurrentPos() {
return Math.max(0, currentEventPos);
} | vuln | Safe | Java |
function processLoad(proc, callback) {
// fallback - if only callback is given
if (util.isFunction(proc) && !callback) {
callback = proc;
proc = '';
}
return new Promise((resolve) => {
process.nextTick(() => {
let processesString = '';
processesString.__proto__.toLowerCase = util.stri... | vuln | Vulnerable | JavaScript |
static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
const unsigned char *sess_id, int sesslen,
SSL_SESSION **psess)
{
SSL_SESSION *sess;
unsigned char *sdec;
const unsigned char *p;
int slen, mlen, renew_ticket = 0;
unsigned char tick_hmac[EVP_MAX_MD_SIZE];
HMAC_CTX hctx;
EVP... | vuln | Vulnerable | Unknown |
@Override
public void handleLeftClick() {
} | vuln | Vulnerable | Java |
def local_media_filepath_rel(self, media_id: str) -> str:
return os.path.join(
"local_content",
_validate_path_component(media_id[0:2]),
_validate_path_component(media_id[2:4]),
_validate_path_component(media_id[4:]),
) | vuln | Safe | Python |
static void lm32_evr_init(QEMUMachineInitArgs *args)
{
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
LM32CPU *cpu;
CPULM32State *env;
DriveInfo *dinfo;
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *phys_ram = g_new(Memor... | vuln | Safe | C/C++ |
int PreProcessingFx_Command(effect_handle_t self,
uint32_t cmdCode,
uint32_t cmdSize,
void *pCmdData,
uint32_t *replySize,
void *pReplyData)
{
preproc_effect_t * effect = (preproc_effect_t *) self;
int retsize;
int status;
if (effect == NULL){
return -EINVAL;
}
switch (cmdCode){
c... | vuln | Vulnerable | C/C++ |
public Course findOneWithExercisesAndLecturesAndExamsAndLearningGoalsAndTutorialGroupsForUser(Long courseId, User user) {
Course course = courseRepository.findByIdWithLecturesAndExamsElseThrow(courseId);
if (!authCheckService.isAtLeastStudentInCourse(course, user)) {
throw new AccessForbidde... | vuln | Vulnerable | Java |
static int xen_pt_bar_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,
uint32_t *value, uint32_t valid_mask)
{
XenPTRegInfo *reg = cfg_entry->reg;
uint32_t valid_emu_mask = 0;
uint32_t bar_emu_mask = 0;
int index;
index = xen_pt_bar_offset_to_index(reg->of... | vuln | Vulnerable | C/C++ |
static bool net_tx_pkt_do_sw_fragmentation(struct NetTxPkt *pkt,
NetClientState *nc)
{
struct iovec fragment[NET_MAX_FRAG_SG_LIST];
size_t fragment_len = 0;
bool more_frags = false;
/* some pointers for shorter code */
void *l2_iov_base, *l3_iov_base;
size_t l2_iov_len, l3_iov_len;
int ... | vuln | Safe | C/C++ |
hserver = require('http').createServer(function(req,res){
console.log('Serving: %s',req.url);
var rs = fs.createReadStream(__dirname+path.normalize(req.url).replace(/^(\.\.[\/\\])+/, ''),{
flags: 'r',
autoClose: true
});
rs.on('open',function(){
rs.pipe(res);
});
rs.on('error',function(e){
res.e... | vuln | Safe | JavaScript |
def get_list(doctype, *args, **kwargs):
'''wrapper for DatabaseQuery'''
kwargs.pop('cmd', None)
kwargs.pop('ignore_permissions', None)
kwargs.pop('data', None)
# If doctype is child table
if frappe.is_table(doctype):
# Example frappe.db.get_list('Purchase Receipt Item', {'parent': 'Purchase Receipt'})
# Here... | vuln | Vulnerable | Python |
PHP_FUNCTION(pcntl_exec)
{
zval *args = NULL, *envs = NULL;
zval **element;
HashTable *args_hash, *envs_hash;
int argc = 0, argi = 0;
int envc = 0, envi = 0;
int return_val = 0;
char **argv = NULL, **envp = NULL;
char **current_arg, **pair;
int pair_length;
char *key;
uint key_length;
char *path;
int path_... | vuln | Safe | Unknown |
read_attribute(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr,
int name_size)
{
const byte *p;
byte *buf;
size_t len, nread;
cdk_error_t rc;
if (!inp || !attr || !pktlen)
return CDK_Inv_Value;
if (DEBUG_PKT)
_gnutls_write_log("read_attribute: %d octets\n",
(int) pktlen);
_gnutls_str_... | vuln | Safe | C/C++ |
gs_window_destroy (GSWindow *window)
{
g_return_if_fail (GS_IS_WINDOW (window));
if (window->priv->lock_pid > 0) {
gs_window_dialog_finish (window);
}
remove_popup_dialog_idle (window);
remove_command_watches (window);
remove_watchdog_timer (window);
... | vuln | Vulnerable | Unknown |
void qmp_block_resize(bool has_device, const char *device,
bool has_node_name, const char *node_name,
int64_t size, Error **errp)
{
Error *local_err = NULL;
BlockDriverState *bs;
int ret;
bs = bdrv_lookup_bs(has_device ? device : NULL,
... | vuln | Vulnerable | C/C++ |
pci_emul_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr,
int size, uint64_t *val, void *arg1, long arg2)
{
struct pci_vdev *pdi = arg1;
struct pci_vdev_ops *ops = pdi->dev_ops;
uint64_t offset;
int bidx = (int) arg2;
if (addr + size > pdi->bar[bidx].addr + pdi->bar[bidx].size) {
printf("... | vuln | Safe | Unknown |
def invite_users_backend(
request: HttpRequest,
user_profile: UserProfile,
invitee_emails_raw: str = REQ("invitee_emails"),
invite_expires_in_minutes: Optional[int] = REQ(
json_validator=check_none_or(check_int), default=INVITATION_LINK_VALIDITY_MINUTES
),
invite_as: int = REQ(
j... | vuln | Vulnerable | Python |
@Redirect(method = "insertItem",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/item/ItemStack;isEmpty()Z",
ordinal = 1
)
)
// redirect "if (!itemStack.isEmpty() && ItemStack.canCombine(stack, itemStack))" -> "if (!canNotI... | vuln | Safe | 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 | Vulnerable | C/C++ |
unique_ptr<IOBuf> IOBuf::create(std::size_t capacity) {
if (capacity > kMaxIOBufSize) {
throw_exception<std::bad_alloc>();
}
// For smaller-sized buffers, allocate the IOBuf, SharedInfo, and the buffer
// all with a single allocation.
//
// We don't do this for larger buffers since it can be wasteful i... | vuln | Safe | Unknown |
static void sungem_send_packet(SunGEMState *s, const uint8_t *buf,
int size)
{
NetClientState *nc = qemu_get_queue(s->nic);
if (s->macregs[MAC_XIFCFG >> 2] & MAC_XIFCFG_LBCK) {
nc->info->receive(nc, buf, size);
} else {
qemu_send_packet(nc, buf, size);
}
} | vuln | Vulnerable | C/C++ |
public static Secret decrypt(String data) {
if(data==null) return null;
try {
Cipher cipher = getCipher("AES");
cipher.init(Cipher.DECRYPT_MODE, getKey());
String plainText = new String(cipher.doFinal(Base64.decode(data.toCharArray())), "UTF-8");
if(p... | vuln | Vulnerable | Java |
static int
xfs_iget_cache_miss(
struct xfs_mount *mp,
struct xfs_perag *pag,
xfs_trans_t *tp,
xfs_ino_t ino,
struct xfs_inode **ipp,
int flags,
int lock_flags)
{
struct xfs_inode *ip;
int error;
xfs_agino_t agino = XFS_INO_TO_AGINO(mp, ino);
int iflags;
ip = xfs_inode_alloc(mp, ino);
if (!ip)
... | vuln | Vulnerable | C/C++ |
def __init__(self):
def generate(length, numbers=False, symbols=False, uppercase=False, lowercase=False, space=False, save=False):
password = ''
if numbers:
password += string.digits
if symbols:
password += string.punctuation
if up... | vuln | Vulnerable | Python |
import dayjs from 'dayjs'
import { Random } from 'meteor/random'
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'
import { t } from '../../utils/i18n.js'
import './administration.html'
import { Globalsettings } from '../../api/globalsettings/globalsettings'
import { displayUserAvatar, validateEmail, showToa... | vuln | Vulnerable | JavaScript |
private FTBChunksTeamData loadTeamData(Team team) {
Path path = dataDirectory.resolve(team.getId() + ".snbt");
FTBChunksTeamData data = new FTBChunksTeamData(this, path, team);
CompoundTag dataFile = null;
try (BufferedReader reader = Files.newBufferedReader(path)) {
dataFile = SNBTParser.read(reader);
} c... | vuln | Safe | Java |
int
nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_writeargs *args)
{
unsigned int len, v, hdr, dlen;
u32 max_blocksize = svc_max_payload(rqstp);
struct kvec *head = rqstp->rq_arg.head;
struct kvec *tail = rqstp->rq_arg.tail;
p = decode_fh(p, &args->fh);
if (!p)
return 0;
p = xd... | vuln | Vulnerable | C/C++ |
int qemu_fdt_setprop_sized_cells_from_array(void *fdt,
const char *node_path,
const char *property,
int numvalues,
uint64_t *values)
{
uint3... | vuln | Vulnerable | C/C++ |
sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_association *new_asoc;
sctp_init_chunk_t *peer_init;
struct sctp_chun... | vuln | Safe | Unknown |
@PostMapping("/login/token")
public ResponseEntity<TokenResponse> login(@RequestBody TokenRequest tokenRequest) {
String accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJpZFwiOjEsXCJlbWFpbFwiOlwiZW1haWxAZW1haWwuY29tXCIsXCJwYXNzd29yZFwiOlwicGFzc3dvcmRcIixcIm5hbWVcIjpcIuyCrOyaqeyekFwiLFwicHJpbmNpcGFsXCI6XCJ... | vuln | Vulnerable | Java |
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands)
{
int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
int32_t ... | vuln | Safe | C/C++ |
static int bson_append_string_base( bson *b, const char *name,
const char *value, int len, bson_type type ) {
int sl = len + 1;
if ( bson_check_string( b, ( const char * )value, sl - 1 ) == BSON_ERROR )
return BSON_ERROR;
if ( bson_append_estart( b, type, name, 4... | vuln | Vulnerable | Unknown |
static int jpc_pi_nextrpcl(register jpc_pi_t *pi)
{
int rlvlno;
jpc_pirlvl_t *pirlvl;
jpc_pchg_t *pchg;
int prchind;
int prcvind;
int *prclyrno;
int compno;
jpc_picomp_t *picomp;
int xstep;
int ystep;
uint_fast32_t r;
uint_fast32_t rpx;
uint_fast32_t rpy;
uint_fast32_t trx0;
uint_fast32_t try0;
pchg = ... | vuln | Vulnerable | C/C++ |
pkcs11dh_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
dst_private_t priv;
isc_result_t ret;
int i;
unsigned int bits;
pk11_object_t *dh = NULL;
CK_ATTRIBUTE *attr;
isc_mem_t *mctx;
UNUSED(pub);
mctx = key->mctx;
/* read private key file */
ret = dst__privstruct_parse(key, DST_ALG_DH, lexer, mc... | vuln | Safe | Unknown |
int SSH_Access::HandleSSHMessage()
{
int m=STALL;
const char *b;
int s;
pty_recv_buf->Get(&b,&s);
const char *eol=find_char(b,s,'\n');
if(!eol)
{
const char *p="password:";
const char *p_for="password for ";
const char *y="(yes/no)?";
int p_len=strlen(p);
int p_for_len... | vuln | Safe | Unknown |
def passive_login():
logger = logging.getLogger(__name__)
user = flask_login.current_user
remote_address = get_remote_address(flask.request)
ip_check_enabled = settings().getBoolean(["server", "ipCheck", "enabled"])
ip_check_trusted = settings().get(["server", "ipCheck", "trustedSubnets"])
if... | vuln | Safe | Python |
static void uv__rwlock_fallback_rdunlock(uv_rwlock_t* rwlock) {
uv_mutex_lock(&rwlock->fallback_.read_mutex_);
if (--rwlock->fallback_.num_readers_ == 0)
uv_mutex_unlock(&rwlock->fallback_.write_mutex_);
uv_mutex_unlock(&rwlock->fallback_.read_mutex_);
} | vuln | Vulnerable | C/C++ |
yuv2rgba64_2_c_template(SwsContext *c, const int32_t *buf[2],
const int32_t *ubuf[2], const int32_t *vbuf[2],
const int32_t *abuf[2], uint16_t *dest, int dstW,
int yalpha, int uvalpha, int y,
enum AVPixelFormat target, int hasAl... | vuln | Vulnerable | C/C++ |
int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
{
int index = le32_to_cpu(e820_reserve.count);
struct e820_entry *entry;
if (type != E820_RAM) {
if (index >= E820_NR_ENTRIES) {
return -EBUSY;
}
entry = &e820_reserve.entry[index++];
en... | vuln | Vulnerable | C/C++ |
static av_always_inline void predict(PredictorState *ps, int *coef,
int output_enable)
{
const SoftFloat a = { 1023410176, 0 };
const SoftFloat alpha = { 973078528, 0 };
SoftFloat e0, e1;
SoftFloat pv;
SoftFloat k1, k2;
SoftFloat r0 = ps->r0, r... | vuln | Safe | C/C++ |
function get_the_generator( $type = '' ) {
if ( empty( $type ) ) {
$current_filter = current_filter();
if ( empty( $current_filter ) ) {
return;
}
switch ( $current_filter ) {
case 'rss2_head':
case 'commentsrss2_head':
$type = 'rss2';
break;
case 'rss_head':
case 'opml_head':
$typ... | vuln | Vulnerable | PHP |
ModuleSQL::~ModuleSQL()
{
if (Dispatcher)
{
Dispatcher->join();
Dispatcher->OnNotify();
delete Dispatcher;
}
for(ConnMap::iterator i = connections.begin(); i != connections.end(); i++)
{
delete i->second;
}
} | vuln | Vulnerable | Unknown |
/*
* 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 may n... | vuln | Safe | Java |
async def _handle_deltas(self, deltas: List[Dict[str, Any]]) -> None:
"""Called with the state deltas to process
"""
for delta in deltas:
typ = delta["type"]
state_key = delta["state_key"]
room_id = delta["room_id"]
event_id = delta["event_id"]
... | vuln | Vulnerable | Python |
static int mov_read_mac_string(MOVContext *c, AVIOContext *pb, int len,
char *dst, int dstlen)
{
char *p = dst;
char *end = dst+dstlen-1;
int i;
for (i = 0; i < len; i++) {
uint8_t t, c = avio_r8(pb);
if (c < 0x80 && p < end)
*p++ = c;
e... | vuln | Vulnerable | C/C++ |
# -*- coding: utf-8 -*-
'''
feedgen.ext.torrent
~~~~~~~~~~~~~~~~~~~
Extends the FeedGenerator to produce torrent feeds.
:copyright: 2016, Raspbeguy <raspbeguy@hashtagueule.fr>
:license: FreeBSD and LGPL, see license.* for more details.
'''
from lxml import etree
from feedgen.ext.base import Bas... | vuln | Vulnerable | Python |
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
CosmeticsManager cosmeticsManager = DungeonsGuide.getDungeonsGuide().getCosmeticsManager();
List<A... | vuln | Safe | Java |
/*-------------------------------------------------------------------------
*
* pqcomm.c
* Communication functions between the Frontend and the Backend
*
* These routines handle the low-level details of communication between
* frontend and backend. They just shove data across the communication
* channel, and ... | vuln | Safe | Java |
import hashlib
import logging
import os.path
import uuid
from collections import defaultdict
from datetime import date, timedelta
from typing import List, Mapping, Optional, Tuple
from django.core.files.base import File
from django.db import models
from django.utils import timezone
from django.utils.translation import... | vuln | Vulnerable | Python |
int
compile_lhs(
char_u *var_start,
lhs_T *lhs,
cmdidx_T cmdidx,
int heredoc,
int has_cmd, // "var" before "var_start"
int oplen,
cctx_T *cctx)
{
char_u *var_end;
int is_decl = is_decl_command(cmdidx);
CLEAR_POINTER(lhs);
lhs->lhs_dest = dest_local;
lhs->lhs_v... | vuln | Safe | C/C++ |
@Override
public User execute(ServiceProvider context) {
User user = context.service(IdentityProvider.class).auth(username, password);
if (user == null) {
user = context.service(IdentityProvider.class).authJWT(token);
}
if (user == null) {
throw new UnauthorizedException("Incorrect username or password."... | vuln | Vulnerable | Java |
/*
Copyright The Helm 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, software
di... | vuln | Safe | Go |
bool_t xdr_nullstring(XDR *xdrs, char **objp)
{
u_int size;
if (xdrs->x_op == XDR_ENCODE) {
if (*objp == NULL)
size = 0;
else
size = strlen(*objp) + 1;
}
if (! xdr_u_int(xdrs, &size)) {
return FALSE;
}
switch (xdrs->x_op) {
case XDR_DECODE:
if (size == 0) {
... | vuln | Safe | C/C++ |
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... | vuln | Safe | C/C++ |
auth_spa_server(auth_instance *ablock, uschar *data)
{
auth_spa_options_block *ob = (auth_spa_options_block *)(ablock->options_block);
uint8x lmRespData[24];
uint8x ntRespData[24];
SPAAuthRequest request;
SPAAuthChallenge challenge;
SPAAuthResponse response;
SPAAuthResponse *responseptr = &response;
uschar msgbuf[204... | vuln | Vulnerable | Unknown |
struct inode *__ext4_new_inode(handle_t *handle, struct inode *dir,
umode_t mode, const struct qstr *qstr,
__u32 goal, uid_t *owner, __u32 i_flags,
int handle_type, unsigned int line_no,
int nblocks)
{
struct super_block *sb;
struct buffer_head *inode_bitmap_bh = NULL;
struct ... | vuln | Safe | Unknown |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.