code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static int decode_chunks(AVCodecContext *avctx,
AVFrame *picture, int *got_output,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
const uint8_t *buf_ptr = buf;
const uint8_t *buf_end = buf +... | vuln | Vulnerable | C/C++ |
public void createDBIfNotExists(RdbConfig rdb) throws SQLException {
LOGGER.info("Checking DB " + rdb.RdbUrl);
Properties properties = new Properties();
properties.put("user", rdb.RdbUsername);
properties.put("password", rdb.RdbPassword);
properties.put("sslMode", rdb.sslMode);
final var dbUrl =... | vuln | Safe | Java |
static long acrn_dev_ioctl(struct file *filp, unsigned int cmd,
unsigned long ioctl_param)
{
struct acrn_vm *vm = filp->private_data;
struct acrn_vm_creation *vm_param;
struct acrn_vcpu_regs *cpu_regs;
struct acrn_ioreq_notify notify;
struct acrn_ptdev_irq *irq_info;
struct acrn_ioeventfd ioeventfd;
struct... | vuln | Safe | C/C++ |
DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf,
int width, int pitch, int height,
int pixelFormat, unsigned char **dstPlanes,
int *strides, int subsamp, int flags)
{
JSAMPROW *row_pointer = NU... | vuln | Safe | Unknown |
static const char *parse_number( cJSON *item, const char *num )
static int pow2gt (int x) { --x; x|=x>>1; x|=x>>2; x|=x>>4; x|=x>>8; x|=x>>16; return x+1; }
typedef struct {char *buffer; int length; int offset; } printbuffer;
static char* ensure(printbuffer *p,int needed)
{
char *newbuffer;int newsize;
if (!p || ... | vuln | Safe | C/C++ |
static inline int
snmp_engine_get_bulk(snmp_header_t *header, snmp_varbind_t *varbinds)
{
snmp_mib_resource_t *resource;
snmp_oid_t oids[SNMP_MAX_NR_VALUES];
uint32_t j, original_varbinds_length;
uint8_t repeater;
uint8_t i, varbinds_length;
/*
* A local copy of the requested oids must be kept since
... | vuln | Safe | C/C++ |
mail_config_ews_autodiscover_run_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
AsyncContext *async_context = user_data;
EMailConfigEwsAutodiscover *autodiscover;
EAlertSink *alert_sink;
GError *error = NULL;
EMailCo... | vuln | Safe | Unknown |
private long tryOpenMic(@Nullable String string) throws MicrophoneException {
long l = ALC11.alcCaptureOpenDevice(string, sampleRate, AL11.AL_FORMAT_MONO16, bufferSize);
if (l == 0L) {
throw new MicrophoneException(String.format("Failed to open microphone: %s", SoundManager.getError(0)));
... | vuln | Vulnerable | Java |
int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header)
{
int sample_rate, frame_size, mpeg25, padding;
int sample_rate_index, bitrate_index;
if (header & (1<<20)) {
s->lsf = (header & (1<<19)) ? 0 : 1;
mpeg25 = 0;
} else {
s->lsf = 1;
mpeg25 = 1;
}
... | vuln | Vulnerable | C/C++ |
void HTMLLinkElement::insertedIntoDocument()
{
HTMLElement::insertedIntoDocument();
document()->addStyleSheetCandidateNode(this, m_createdByParser);
if (document()->hasListenerType(Document::BEFORELOAD_LISTENER)) {
m_shouldProcessAfterAttach = true;
return;
}
process();
} | vuln | Vulnerable | C/C++ |
public static LogLine from(String raw) {
int startIndex = 0;
while (raw.charAt(startIndex) != ':') startIndex++;
String level = String.valueOf(raw.charAt(0));
String msg = raw.substring(startIndex + 1).replaceAll("\t", " ");
return new LogLine(level, msg);
... | vuln | Vulnerable | Java |
/*
* FastCGI protocol processing
*
* Copyright (C) 2019 HAProxy Technologies, Christopher Faulet <cfaulet@haproxy.com>
*
* 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 restric... | vuln | Vulnerable | C/C++ |
static char *userauth_list(LIBSSH2_SESSION *session, const char *username,
unsigned int username_len)
{
static const unsigned char reply_codes[3] =
{ SSH_MSG_USERAUTH_SUCCESS, SSH_MSG_USERAUTH_FAILURE, 0 };
/* packet_type(1) + username_len(4) + service_len(4) +
service(... | vuln | Safe | Unknown |
static Image *ReadWPGImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
typedef struct
{
size_t FileId;
MagickOffsetType DataOffset;
unsigned int ProductType;
unsigned int FileType;
unsigned char MajorVersion;
unsigned char MinorVersion;
unsigned int EncryptKey;
unsigne... | vuln | Vulnerable | Unknown |
/*
* InspIRCd -- Internet Relay Chat Daemon
*
* Copyright (C) 2012 William Pitcock <nenolod@dereferenced.org>
* Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
* Copyright (C) 2006, 2009 Robin Burchell <robin+git@viroteck.net>
* Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
... | vuln | Safe | C/C++ |
int URI_FUNC(ComposeQueryEngine)(URI_CHAR * dest,
const URI_TYPE(QueryList) * queryList,
int maxChars, int * charsWritten, int * charsRequired,
UriBool spaceToPlus, UriBool normalizeBreaks) {
UriBool firstItem = URI_TRUE;
int ampersandLen = 0; /* increased to 1 from second item on */
URI_CHAR * write = dest;
... | vuln | Safe | C/C++ |
static void
addr_spec_with_generic_uri(pbelle_sip_messageParser ctx, belle_sip_header_address_t* object)
{
belle_sip_uri_t* uri54;
#undef RETURN_TYPE_uri54
#define RETURN_TYPE_uri54 belle_sip_uri_t*
belle_generic_uri_t* generic_uri55;
#undef RETURN_TYPE_generic_uri55
#define RETURN_TYPE_generic... | vuln | Vulnerable | C/C++ |
static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
int sockaddr_len, int flags)
{
struct sock *sk = sock->sk;
struct sockaddr_pppox *sp = (struct sockaddr_pppox *) uservaddr;
struct pppox_sock *po = pppox_sk(sk);
struct pptp_opt *opt = &po->proto.pptp;
struct rtable *rt;
struct flowi4 fl4;... | vuln | Vulnerable | C/C++ |
public void updateOverlayAxisIndicators() {
if (output == null || !isLocalRunning() || !isServerRunning())
return;
EnumSet.allOf(Input.VirtualAxis.class).stream()
.filter(virtualAxis -> virtualAxisToProgressBarMap.containsKey(virtualAxis)).forEach(virtualAxis -> {
final var progressBar = virtualAxisToP... | vuln | Safe | Java |
import './allprojectschart.html'
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'
import { getUserSetting, getUserTimeUnitVerbose } from '../../utils/frontend_helpers'
Template.allprojectschart.onCreated(function allprojectschartCreated() {
this.topTasks = new ReactiveVar()
this.projectStats = new Reac... | vuln | Safe | JavaScript |
static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
uint64_t *l2_table, uint64_t stop_flags)
{
int i;
uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
uint64_t first_entry = be64_to_cpu(l2_table[0]);
uint64_t offset = first_entry & mask;
if (!off... | vuln | Safe | C/C++ |
BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
{
_gdImageGifCtx(im, out);
} | vuln | Safe | Unknown |
static void ppc_prep_init (ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename,
const char *cpu_model)
{
... | vuln | Safe | C/C++ |
static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd, unsigned int flags)
{
int result;
handle_t *handle = NULL;
struct inode *inode = file_inode(vma->vm_file);
struct super_block *sb = inode->i_sb;
bool write = flags & FAULT_FLAG_WRITE;
if (write) {
sb_start_pagefault... | vuln | Vulnerable | C/C++ |
ext4_xattr_put_super(struct super_block *sb)
{
mb_cache_shrink(sb->s_bdev);
} | vuln | Vulnerable | C/C++ |
public void updateTransferredResource(Optional<String> folderRelativePath, ContentPayload payload, String name,
boolean waitToFinish)
throws NotFoundException, GenericException, IOException, IsStillUpdatingException, AuthorizationDeniedException {
RodaCoreFactory.checkIfWriteIsAllowedAndIfFalseThrowExceptio... | vuln | Vulnerable | Java |
static int __init pcd_init(void)
{
struct pcd_unit *cd;
int unit;
if (disable)
return -EINVAL;
pcd_init_units();
if (pcd_detect())
return -ENODEV;
/* get the atapi capabilities page */
pcd_probe_capabilities();
if (register_blkdev(major, name)) {
for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd+... | vuln | Vulnerable | C/C++ |
@Override
public boolean onTouchEvent(MotionEvent event) {
try {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
Editable edit = getText();
int off = Helper.getOffset(this, edit, event);
ClipImageSpan[] spans = edit.getSpans(off, off, Cli... | vuln | Vulnerable | Java |
public PathConnection[] findRoute(PathNode destination) {
if (findConnection(destination) == null) {
return new PathConnection[0];
}
List<PathConnection> route = new ArrayList<>();
PathConnection conn = this.lastTaken;
while (conn != null) {
route.add(conn... | vuln | Vulnerable | Java |
parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
ksba_isotime_t isotime)
{
struct tag_info ti;
gpg_error_t err;
err = _ksba_ber_parse_tl (buf, len, &ti);
if (err)
;
else if ( !(ti.class == CLASS_UNIVERSAL
&& (ti.tag == TYPE_UTC_TIME || ti.tag ... | vuln | Vulnerable | C/C++ |
def DynamicAnalyzer(request):
print "\n[INFO] Dynamic Analysis Started"
try:
if request.method == 'POST':
MD5=request.POST['md5']
PKG=request.POST['pkg']
LNCH=request.POST['lng']
if re.findall(";|\$\(|\|\||&&",PKG) or re.findall(";|\$\(|\|\||&&",LNCH)... | vuln | Safe | Python |
/**
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
*
* The Apereo Foundation licenses this file to you under the Educational
* Community License, Version 2.0 (the ... | vuln | Safe | Java |
var userentitiesTable = $('#userentities-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#userentities-table tbody').removeClass("d-none");
userentitiesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(f... | vuln | Safe | JavaScript |
SPL_METHOD(SplObjectStorage, unserialize)
{
spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis());
char *buf;
size_t buf_len;
const unsigned char *p, *s;
php_unserialize_data_t var_hash;
zval entry, inf;
zval *pcount, *pmembers;
spl_SplObjectStorageElement *element;
zend_long count;
if (zend_parse_par... | vuln | Vulnerable | C/C++ |
NUM_numpart_to_char(NUMProc *Np, int id)
{
int end;
if (IS_ROMAN(Np->Num))
return;
/* Note: in this elog() output not set '\0' in 'inout' */
#ifdef DEBUG_TO_FROM_CHAR
/*
* Np->num_curr is number of current item in format-picture, it is not
* current position in inout!
*/
elog(DEBUG_elog_output,
"S... | vuln | Vulnerable | C/C++ |
int run_diff_files(struct rev_info *revs, unsigned int option)
{
int entries, i;
int diff_unmerged_stage = revs->max_count;
int silent_on_removed = option & DIFF_SILENT_ON_REMOVED;
unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED)
? CE_MATCH_RACY_IS_DIRTY : 0);
char symcache[PATH_MAX];
if (diff_unm... | vuln | Safe | Unknown |
read_channel_data (PSDchannel *channel,
const guint16 bps,
const guint16 compression,
const guint16 *rle_pack_len,
FILE *f,
GError **error)
{
gchar *raw_data;
gchar *src;
gchar *dst;
... | vuln | Vulnerable | C/C++ |
int HttpFileImpl::save(const std::string &path) const
{
assert(!path.empty());
if (fileName_.empty())
return -1;
filesystem::path fsPath(utils::toNativePath(path));
if (!fsPath.is_absolute() &&
(!fsPath.has_parent_path() ||
(fsPath.begin()->string() != "." && fsPath.begin()->str... | vuln | Vulnerable | Unknown |
from typing import Any, Dict, List, Optional, Union
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.core.files.uploadedfile import UploadedFile
from django.http import HttpRequest, HttpResponse
from django.shortcuts import redirect
from django.utils.translation import ... | vuln | Safe | Python |
static void virtio_device_realize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(dev);
Error *err = NULL;
assert(!vdc->vmsd || !vdc->load);
if (vdc->realize != NULL) {
vdc->realize(dev, &err);
if (err !... | vuln | Vulnerable | C/C++ |
asn1_get_type(unsigned char **buffer, /* IO - Pointer in buffer */
unsigned char *bufend) /* I - End of buffer */
{
int type; /* Type */
type = **buffer;
(*buffer) ++;
if ((type & 31) == 31)
type = asn1_get_packed(buffer, bufend);
return (type);
} | vuln | Vulnerable | Unknown |
static int multiwrite_req_compare(const void *a, const void *b)
{
const BlockRequest *req1 = a, *req2 = b;
if (req1->sector > req2->sector) {
return 1;
} else if (req1->sector < req2->sector) {
return -1;
} else {
return 0;
}
} | vuln | Safe | C/C++ |
void PrintViewManagerBase::OnDidPrintPage(
const PrintHostMsg_DidPrintPage_Params& params) {
if (!OpportunisticallyCreatePrintJob(params.document_cookie))
return;
PrintedDocument* document = print_job_->document();
if (!document || params.document_cookie != document->cookie()) {
return;
}
#if def... | vuln | Vulnerable | C/C++ |
static int get_siz(Jpeg2000DecoderContext *s)
{
int i;
int ncomponents;
uint32_t log2_chroma_wh = 0;
const enum AVPixelFormat *possible_fmts = NULL;
int possible_fmts_nb = 0;
if (bytestream2_get_bytes_left(&s->g) < 36)
return AVERROR_INVALIDDATA;
s->avctx->profile = bytestream2_get... | vuln | Vulnerable | Unknown |
/*
* 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 |
/*
* gsf-infile-tar.c :
*
* Copyright (C) 2008 Morten Welinder (terra@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed ... | vuln | Vulnerable | C/C++ |
function handleParseHeaders(req, res, next) {
var mount = getMountForRequest(req);
var info = {
appId: req.get('X-Parse-Application-Id'),
sessionToken: req.get('X-Parse-Session-Token'),
masterKey: req.get('X-Parse-Master-Key'),
installationId: req.get('X-Parse-Installation-Id'),
clientKey: req.... | vuln | Vulnerable | JavaScript |
static void gen_tlbwe_440(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
GEN_PRIV;
#else
CHK_SV;
switch (rB(ctx->opcode)) {
case 0:
case 1:
case 2:
{
TCGv_i32 t0 = tcg_const_i32(rB(ctx->opcode));
gen_helper_440_tlbwe(cpu_env, t0, cpu_gpr[rA(ctx->opcode)],
... | vuln | Safe | C/C++ |
relative_move(NCURSES_SP_DCLx
string_desc * target,
int from_y,
int from_x,
int to_y,
int to_x,
int ovw)
/* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */
{
string_desc save;
int n, vcost = 0, hcost = 0;
(void) _nc_str_copy(&save, target);
... | vuln | Safe | Unknown |
@Override
protected void pickUpItem(ItemEntity itemEntity) {
ItemStack itemstack = itemEntity.getItem();
if (this.getCatfishSize() != 2 && !isFull() && this.catfishInventory != null && this.catfishInventory.addItem(itemstack).isEmpty()) {
this.onItemPickup(itemEntity);
this.t... | vuln | Safe | Java |
public ScribesTile getLogicTile(){
ScribesTile tile = this;
if(!isMasterTile()) {
BlockEntity tileEntity = level.getBlockEntity(getBlockPos().relative(ScribesBlock.getConnectedDirection(getBlockState())));
tile = tileEntity instanceof ScribesTile ? (ScribesTile) tileEntity : null... | vuln | Vulnerable | Java |
public UserAuthentication getOrCreateUser(App app, String accessToken) {
UserAuthentication userAuth = null;
User user = new User();
String secret = Para.getConfig().getSettingForApp(app, "app_secret_key", app.getSecret());
try {
SignedJWT jwt = SignedJWT.parse(accessToken);
String email = jwt.getJWTClaim... | vuln | Safe | Java |
WORD32 ih264d_process_intra_mb(dec_struct_t * ps_dec,
dec_mb_info_t * ps_cur_mb_info,
UWORD8 u1_mb_num)
{
UWORD8 u1_mb_type = ps_cur_mb_info->u1_mb_type;
UWORD8 uc_temp = ps_cur_mb_info->u1_mb_ngbr_availablity;
UWORD8 u1_top_available = BOOLEAN(uc_temp & TOP_MB_AVAILABLE_MASK... | vuln | Vulnerable | Unknown |
goto_tabpage_tp(
tabpage_T *tp,
int trigger_enter_autocmds,
int trigger_leave_autocmds)
{
CHECK_CMDWIN;
// Don't repeat a message in another tab page.
set_keep_msg(NULL, 0);
if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer,
trigger_leave_autocmds) == OK)
{
if (valid_ta... | vuln | Safe | Unknown |
@Override
public boolean onOptionItemPressed (View itemView, int id) {
switch (id) {
case R.id.btn_messageApplyLocalization: {
if (selectedMessage != null && selectedMessage.getMessage().content.getConstructor() == TdApi.MessageDocument.CONSTRUCTOR) {
TdApi.Document document = ((TdApi.Mess... | vuln | Vulnerable | Java |
@Override
protected XrootdResponse<DirListRequest> doOnDirList(ChannelHandlerContext ctx, DirListRequest request)
throws XrootdException
{
try {
String listPath = request.getPath();
if (listPath.isEmpty()) {
throw new XrootdException(kXR_ArgMissing, "no so... | vuln | Vulnerable | Java |
DLL_EXPORT_XLSXIO xlsxioreadersheetlist xlsxioread_sheetlist_open (xlsxioreader handle)
{
//determine main sheet name
XML_Char* mainsheetfile = NULL;
iterate_files_by_contenttype(handle->zip, xlsx_content_type, xlsxioread_find_main_sheet_file_callback, &mainsheetfile, NULL);
if (!mainsheetfile)
iterate_file... | vuln | Vulnerable | C/C++ |
public static boolean doesBeesHateEntity(Entity entity) {
//Also checks to make sure we are in the dimension.
if (entity != null &&
!entity.level.isClientSide() &&
entity.level.dimension().location().equals(Bumblezone.MOD_DIMENSION_ID) &&
Bumblezone.BZ_CONFIG.BZBeeAg... | vuln | Vulnerable | Java |
static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
struct buffer_head *bh)
{
struct f2fs_super_block *raw_super = (struct f2fs_super_block *)
(bh->b_data + F2FS_SUPER_OFFSET);
struct super_block *sb = sbi->sb;
unsigned int blocksize;
if (F2FS_SUPER_MAGIC != le32_to_cpu(raw_super->magic)) {
f2fs... | vuln | Safe | C/C++ |
static int hci_uart_set_proto(struct hci_uart *hu, int id)
{
const struct hci_uart_proto *p;
int err;
p = hci_uart_get_proto(id);
if (!p)
return -EPROTONOSUPPORT;
hu->proto = p;
set_bit(HCI_UART_PROTO_READY, &hu->flags);
err = hci_uart_register_dev(hu);
if (err) {
clear_bit(HCI_UART_PROTO_READY, &h... | vuln | Vulnerable | C/C++ |
@Override
public Component getName(ItemStack stack) {
LootCrate crate = getCrate(stack);
return crate != null && !crate.itemName.isEmpty() ? new TextComponent(crate.itemName) : super.getName(stack);
} | vuln | Safe | Java |
int countHopsForTopic(String topic, String sourceClusterAlias) {
int hops = 0;
while (true) {
hops++;
String source = replicationPolicy.topicSource(topic);
if (source == null) {
return -1;
}
if (source.equals(sourceClusterAlias)... | vuln | Vulnerable | Java |
getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread,
wgint restval, ccon *con, int count, wgint *last_expected_bytes,
FILE *warc_tmp)
{
int csock, dtsock, local_sock, res;
uerr_t err = RETROK; /* appease the compiler */
FILE *fp;
char *respline, *tms;
const char *user... | vuln | Safe | Unknown |
_gnutls_ciphertext2compressed (gnutls_session_t session,
opaque * compress_data,
int compress_size,
gnutls_datum_t ciphertext, uint8_t type)
{
uint8_t MAC[MAX_HASH_SIZE];
uint16_t c_length;
uint8_t pad;
int length;
digest_hd_st td;
uint16_t blocksize;
int ret, i, pad_failed =... | vuln | Safe | C/C++ |
/*
* The copyright in this software is being made available under the 2-clauses
* BSD License, included below. This software may be subject to other third
* party and contributor rights, including patent rights, and no such rights
* are granted under this license.
*
* Copyright (c) 2002-2014, Universite catholiqu... | vuln | Vulnerable | C/C++ |
int imap_subscribe(char *path, bool subscribe)
{
struct ImapData *idata = NULL;
char buf[LONG_STRING];
char mbox[LONG_STRING];
char errstr[STRING];
struct Buffer err, token;
struct ImapMbox mx;
size_t len = 0;
if (!mx_is_imap(path) || imap_parse_path(path, &mx) || !mx.mbox)
{
mutt_error(_("Bad ma... | vuln | Safe | C/C++ |
@Override
public Optional<Map<K, V>> deserialize(PersistedData data) {
if (!data.isArray()) {
return Optional.empty();
}
Map<K, V> result = Maps.newLinkedHashMap();
for (PersistedData entry : data.getAsArray()) {
PersistedDataMap kvEntry = entry.getAsValueMa... | vuln | Vulnerable | Java |
static struct fileIdentDesc *udf_find_entry(struct inode *dir,
const struct qstr *child,
struct udf_fileident_bh *fibh,
struct fileIdentDesc *cfi)
{
struct fileIdentDesc *fi = NULL;
loff_t f_pos;
int block, flen;
unsigned char *fname = NULL;
unsigned char *nameptr;
uint8_t lfi;
uint16_... | vuln | Vulnerable | C/C++ |
clone (gitUrl, options, callback) {
if (typeof options === "function") {
callback = options;
options = "";
}
return this.exec(['clone', gitUrl, ...options.split(' ')], callback);
} | vuln | Safe | JavaScript |
async function usersPersistentData() {
if (!this.userId) {
return UsersPersistentData.find({ meetingId: '' });
}
const { meetingId, requesterUserId } = extractCredentials(this.userId);
check(meetingId, String);
check(requesterUserId, String);
const selector = {
meetingId,
};
const options = {... | vuln | Safe | JavaScript |
polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus_name,
guint32 *out_uid,
guint32 *out_pid,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
... | vuln | Safe | Unknown |
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
/*
xmlInitParser();
*/
*/
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
if (ctxt) {
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
ctxt->sax-... | vuln | Vulnerable | C/C++ |
purgekeys_2_svc(purgekeys_arg *arg, struct svc_req *rqstp)
{
static generic_ret ret;
char *prime_arg, *funcname;
gss_buffer_desc client_name, service_name;
OM_uint32 minor_stat;
kadm5_server_handle_t handle;
const char ... | vuln | Vulnerable | C/C++ |
static int format8BIM(Image *ifile, Image *ofile)
{
char
temp[MagickPathExtent];
unsigned int
foundOSType;
int
ID,
resCount,
i,
c;
ssize_t
count;
unsigned char
*PString,
*str;
resCount=0;
foundOSType=0; /* found the OSType */
(void) foundOSType;
c=ReadBlobByte(... | vuln | Vulnerable | C/C++ |
static Image *ReadRAWImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
const unsigned char
*pixels;
Image
*canvas_image,
*image;
MagickBooleanType
status;
MagickOffsetType
scene;
QuantumInfo
*quantum_info;
QuantumType
quantum_type;
size_t
length;
ssize_... | vuln | Vulnerable | Unknown |
static USBDevice *usb_net_init(const char *cmdline)
{
USBDevice *dev;
QemuOpts *opts;
int idx;
opts = qemu_opts_parse(&qemu_net_opts, cmdline, NULL);
if (!opts) {
qemu_opt_set(opts, "type", "nic");
qemu_opt_set(opts, "model", "usb");
idx = net_client_init(NULL, opts, 0);
if (idx == -... | vuln | Vulnerable | C/C++ |
@Override
protected HashFunction getHMac(final byte[] key) {
return Hashing.hmacSha256(key);
} | vuln | Vulnerable | Java |
# Copyright 2017 Vector Creations Ltd
# Copyright 2018 New Vector Ltd
# Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
#
# 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://w... | vuln | Vulnerable | Python |
@Override
public void forgetDevice(
@NonNull Action onSuccess,
@NonNull Consumer<AuthException> onException
) {
awsMobileClient.getDeviceOperations().forget(new Callback<Void>() {
@Override
public void onResult(Void result) {
onSuccess.call... | vuln | Safe | Java |
private int removeCerts(Map<String, String> newData, Predicate<Map.Entry<String, String>> predicate) {
Iterator<Map.Entry<String, String>> iter = newData.entrySet().iterator();
List<String> removed = new ArrayList<>();
while (iter.hasNext()) {
Map.Entry<String, String> entry = iter.n... | vuln | Safe | Java |
def handle_login(
redirect_type: str = "client",
) -> Response | Tuple[Response, Literal[401]] | None:
# Returns a shallow mutable copy of the immutable
# multi dict.
request_args = request.args.copy()
redirect_url = request_args.pop("redirect_url", "/")
query_args =... | vuln | Safe | Python |
'use strict';
var ar = require('appium-running');
var cp = require('child_process');
var debug = require('debug');
var log = debug('nemo-appium:log');
var error = debug('nemo-appium:error');
module.exports.setup = function (apath, nemo, cb) {
// validate apath since we are going to execute it
// should end i... | vuln | Safe | JavaScript |
static struct sk_buff *macsec_decrypt(struct sk_buff *skb,
struct net_device *dev,
struct macsec_rx_sa *rx_sa,
sci_t sci,
struct macsec_secy *secy)
{
int ret;
struct scatterlist *sg;
unsigned char *iv;
struct aead_request *req;
struct macsec_eth_header *hdr;
u16 icv_len = s... | vuln | Vulnerable | Unknown |
@PostMapping(value = {"/api/package/addAttachment"}, produces = MediaType.APPLICATION_JSON_VALUE)
public Result addAttachment(@CurrentSecurityContext SysUser requestor,
@RequestParam(value = "fileSetId") String fileSetId,
@RequestParam(value = "fileTyp... | vuln | Vulnerable | Java |
def get_mapped_tasks_by_user(project_id: int):
""" Gets all mapped tasks for supplied project grouped by user"""
# Raw SQL is easier to understand that SQL alchemy here :)
sql = """select u.username, u.mapping_level, count(distinct(t.id)), json_agg(distinct(t.id)),
m... | vuln | Safe | Python |
function goToFinish1NF()
{
if (normalizeto !== '1nf') {
goTo2NFStep1();
return true;
}
$("#mainContent legend").html(PMA_messages.strEndStep);
$("#mainContent h4").html(
"<h3>" + PMA_sprintf(PMA_messages.strFinishMsg, escapeHtml(PMA_commonParams.get('table'))) + "</h3>"
);
... | vuln | Safe | JavaScript |
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "checkout.h"
#include "git2/repository.h"
#include "git2/refs.h"
#include "git2/tree.h"
#inclu... | vuln | Safe | C/C++ |
static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, int size,
int c, int a, int d,
int width, ptrdiff_t stride)
{
PixletContext *ctx = avctx->priv_data;
GetBitContext *b = &ctx->gbit;
unsigned cnt1, shbits, rlen, nbits, lengt... | vuln | Safe | C/C++ |
int nfc_dep_link_up(struct nfc_dev *dev, int target_index, u8 comm_mode)
{
int rc = 0;
u8 *gb;
size_t gb_len;
struct nfc_target *target;
pr_debug("dev_name=%s comm %d\n", dev_name(&dev->dev), comm_mode);
if (!dev->ops->dep_link_up)
return -EOPNOTSUPP;
device_lock(&dev->dev);
if (dev->shutting_down) {
rc... | vuln | Safe | Unknown |
// Copyright 2014 Unknown
//
// 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 writ... | vuln | Safe | Go |
def get_roster(self, server_id):
sql = """
SELECT username, role
FROM roles
WHERE roles.server_id = %s;
"""
self.cur.execute(sql, (server_id,))
return self.cur.fetchall() | vuln | Safe | Python |
@Override
protected void configure(HttpSecurity http) throws Exception {
// Use a security context holder that can find the context from Vaadin
// specific classes
SecurityContextHolder.setStrategyName(
VaadinAwareSecurityContextHolderStrategy.class.getName());
// Va... | vuln | Vulnerable | Java |
static uint64_t rice_count_exact(int32_t *res, int n, int k)
{
int i;
uint64_t count = 0;
for (i = 0; i < n; i++) {
int32_t v = -2 * res[i] - 1;
v ^= v >> 31;
count += (v >> k) + 1 + k;
}
return count;
} | vuln | Safe | C/C++ |
package configuration
import (
"encoding/json"
"io/ioutil"
logger "github.com/TykTechnologies/tyk-identity-broker/log"
"github.com/TykTechnologies/tyk-identity-broker/tothic"
tyk "github.com/TykTechnologies/tyk-identity-broker/tyk-api"
"github.com/kelseyhightower/envconfig"
"github.com/sirupsen/logrus"
)
var... | vuln | Vulnerable | Go |
uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
{
uint32_t old_val;
trace_esp_mem_readb(saddr, s->rregs[saddr]);
switch (saddr) {
case ESP_FIFO:
if (s->ti_size > 0) {
s->ti_size--;
if ((s->rregs[ESP_RSTAT] & STAT_PIO_MASK) == 0) {
/* Data out. */
... | vuln | Vulnerable | Unknown |
static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MOVContext *mov = s->priv_data;
ByteIOContext *pb = s->pb;
MOVTrack *trk = &mov->tracks[pkt->stream_index];
AVCodecContext *enc = trk->enc;
unsigned int samplesInChunk = 0;
int size= pkt->size;
if (url_is_streamed(s->pb)) retur... | vuln | Vulnerable | C/C++ |
static void tulip_desc_write(TULIPState *s, hwaddr p,
struct tulip_descriptor *desc)
{
const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
if (s->csr[0] & CSR0_DBO) {
stl_be_pci_dma(&s->dev, p, desc->status, attrs);
stl_be_pci_dma(&s->dev, p + 4, desc->control, attrs);
stl_be_pci_d... | vuln | Vulnerable | Unknown |
public static void save() {
String path = Rotp.jarPath();
List<String> raceKeys = new ArrayList<>(raceNames.keySet());
Collections.sort(raceKeys);
try (FileOutputStream fout = new FileOutputStream(new File(path, PREFERENCES_FILE));
// modnar: change to OutputStreamWriter, for... | vuln | Safe | Java |
e_mail_formatter_format_security_header (EMailFormatter *formatter,
EMailFormatterContext *context,
GString *buffer,
EMailPart *part,
guint32 flags)
{
stru... | vuln | Safe | Unknown |
int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos)
{
int idx = -1; // not found
const char* start = &name->GetName()[lastpos + 1];
switch (nid) {
case NID_commonName:
const char* found = strstr(start, "/CN=");
if (found) {
found += 4; // advance to str
... | vuln | Vulnerable | Unknown |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.