code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
static int tiff_unpack_fax(TiffContext *s, uint8_t *dst, int stride,
const uint8_t *src, int size, int width, int lines)
{
int i, ret = 0;
int line;
uint8_t *src2;
av_fast_padded_malloc(&s->fax_buffer, &s->fax_buffer_size, size);
src2 = s->fax_buffer;
if (!src2) {
... | vuln | Safe | C/C++ |
static long restore_tm_user_regs(struct pt_regs *regs,
struct mcontext __user *sr,
struct mcontext __user *tm_sr)
{
long err;
unsigned long msr, msr_hi;
#ifdef CONFIG_VSX
int i;
#endif
/*
* restore general registers but not including MSR or SOFTE. Also
* take care of keeping r2 (TLS) intact if not a ... | vuln | Vulnerable | C/C++ |
static const char *vnc_auth_name(VncDisplay *vd) {
switch (vd->auth) {
case VNC_AUTH_INVALID:
return "invalid";
case VNC_AUTH_NONE:
return "none";
case VNC_AUTH_VNC:
return "vnc";
case VNC_AUTH_RA2:
return "ra2";
case VNC_AUTH_RA2NE:
return "ra2ne";
ca... | vuln | Safe | C/C++ |
bool load_face(Face & face, unsigned int options)
{
#ifdef GRAPHITE2_TELEMETRY
telemetry::category _misc_cat(face.tele.misc);
#endif
Face::Table silf(face, Tag::Silf, 0x00050000);
if (silf) options &= ~gr_face_dumbRendering;
else if (!(options & gr_face_dumbRendering))
... | vuln | Vulnerable | C/C++ |
static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len, int noblock, int flags, int *addr_len)
{
struct inet_sock *inet = inet_sk(sk);
size_t copied = 0;
int err = -EOPNOTSUPP;
struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
struct sk_buff *skb;
if (fla... | vuln | Safe | Unknown |
from flask import current_app, request
from flask_restful import Resource, abort
from dns import reversename, rdatatype
from dns.resolver import NXDOMAIN, NoNameservers
from resolverapi.util import is_valid_hostname, is_valid_rdtype, is_valid_ip
from resolverapi.util.dns_query import parse_query
from resolverapi impor... | vuln | Vulnerable | Python |
int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t dst_color[4],
enum AVPixelFormat pix_fmt, uint8_t rgba_color[4],
int *is_packed_rgba, uint8_t rgba_map_ptr[4])
{
uint8_t rgba_map[4] = {0};
int i;
const AVPixFmtDescriptor ... | vuln | Vulnerable | C/C++ |
isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
{
uint minor = iminor(inode);
isdn_ctrl c;
int drvidx;
int chidx;
int ret;
int i;
char __user *p;
char *s;
union iocpar {
char name[10];
char bname[22];
isdn_ioctl_struct iocts;
isdn_net_ioctl_phone phone;
isdn_net_ioctl_cfg cfg;... | vuln | Safe | Unknown |
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This 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 of
* th... | vuln | Vulnerable | Java |
.factory('Alert', ['$rootScope', function ($rootScope) {
return function (hdr, msg, cls, action, secondAlert, disableButtons, backdrop) {
var scope = $rootScope.$new(), alertClass, local_backdrop;
if (secondAlert) {
$('#alertHeader2').html(hdr);
$('#alert2-modal-msg').html(m... | vuln | Vulnerable | JavaScript |
def post_task(self, name: str, image: str, collaboration_id: int,
input_='', description='', organization_ids: list = None,
databases: list[str] = None) -> dict:
"""Post a new task at the server
It will also encrypt `input_` for each receiving organization.
... | vuln | Safe | Python |
bool GetFileUrl(IDataObject* data_object, base::string16* url, | vuln | Safe | C/C++ |
public boolean isScheduled () {
switch (notification.type.getConstructor()) {
case TdApi.NotificationTypeNewMessage.CONSTRUCTOR:
return ((TdApi.NotificationTypeNewMessage) notification.type).message.isOutgoing;
case TdApi.NotificationTypeNewPushMessage.CONSTRUCTOR:
return ((TdApi.Notific... | vuln | Safe | Java |
void cms_set_pw_data(cms_context *cms, secuPWData *pwdata)
{
ingress();
switch (cms->pwdata.source) {
case PW_SOURCE_INVALID:
case PW_PROMPT:
case PW_DEVICE:
case PW_SOURCE_MAX:
break;
case PW_FROMFD:
if (cms->pwdata.intdata >= 0 &&
!(pwdata->source == PW_FROMFD &&
cms->pwdata.intdata == pwda... | vuln | Vulnerable | Unknown |
static int pop_fetch_message (CONTEXT* ctx, MESSAGE* msg, int msgno)
{
int ret;
void *uidl;
char buf[LONG_STRING];
char path[_POSIX_PATH_MAX];
progress_t progressbar;
POP_DATA *pop_data = (POP_DATA *)ctx->data;
POP_CACHE *cache;
HEADER *h = ctx->hdrs[msgno];
unsigned short bcache = 1;
/* see if we ... | vuln | Vulnerable | Unknown |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
FillDiagHelper(input, output);
return kTfLiteOk;
} | vuln | Vulnerable | C/C++ |
package saml
import (
"bytes"
"crypto"
"crypto/tls"
"crypto/x509"
"encoding/base64"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"text/template"
"time"
"github.com/beevik/etree"
xrv "github.com/mattermost/xml-roundtrip-validator"
dsig "github.com/russellhaering... | vuln | Safe | Go |
static int mpc8_read_header(AVFormatContext *s)
{
MPCContext *c = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
int tag = 0;
int64_t size, pos;
c->header_pos = avio_tell(pb);
if(avio_rl32(pb) != TAG_MPCK){
av_log(s, AV_LOG_ERROR, "Not a Musepack8 file\n");
return AVERR... | vuln | Safe | C/C++ |
static void diag288_timer_expired(void *dev)
{
qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n");
watchdog_perform_action();
switch (get_watchdog_action()) {
case WDT_DEBUG:
case WDT_NONE:
case WDT_PAUSE:
return;
}
wdt_diag288_reset(dev);
} | vuln | Vulnerable | C/C++ |
static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev)
{
struct nlattr *ieee, *app;
struct dcb_app_type *itr;
const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops;
int dcbx;
int err;
if (nla_put_string(skb, DCB_ATTR_IFNAME, netdev->name))
return -EMSGSIZE;
ieee = nla_nest_start(skb, DCB_A... | vuln | Safe | C/C++ |
static int samldb_rodc_add(struct samldb_ctx *ac)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
uint32_t krbtgt_number, i_start, i;
int ret;
struct ldb_val newpass_utf16;
/* find a unused msDS-SecondaryKrbTgtNumber */
i_start = generate_random() & 0xFFFF;
if (i_start == 0) {
i_start = 1;
}
fo... | vuln | Vulnerable | Unknown |
package com.salesmanager.shop.admin.controller.shipping;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import or... | vuln | Vulnerable | Java |
@Override
protected void onInitialize()
{
super.onInitialize();
Label statusCode = new Label("statusCode", LoadableDetachableModel.of(this::getStatusCode));
statusCode.add(visibleWhen(() -> statusCode.getDefaultModelObject() != null));
add(statusCode);
Label statusReaso... | vuln | Vulnerable | Java |
sc_pkcs15emu_oberthur_add_data(struct sc_pkcs15_card *p15card,
unsigned int file_id, unsigned int size, int private)
{
struct sc_context *ctx = p15card->card->ctx;
struct sc_pkcs15_data_info dinfo;
struct sc_pkcs15_object dobj;
unsigned flags;
unsigned char *info_blob = NULL, *label = NULL, *app = NULL, *oid = N... | vuln | Vulnerable | Unknown |
bool CheckClientDownloadRequest::ShouldUploadForDlpScan() {
if (!base::FeatureList::IsEnabled(kDeepScanningOfDownloads))
return false;
int check_content_compliance = g_browser_process->local_state()->GetInteger(
prefs::kCheckContentCompliance);
if (check_content_compliance !=
CheckContentComp... | vuln | Vulnerable | C/C++ |
init (callback) {
return this.exec(['init'], callback);
} | vuln | Safe | JavaScript |
static int xen_platform_initfn(PCIDevice *dev)
{
PCIXenPlatformState *d = XEN_PLATFORM(dev);
uint8_t *pci_conf;
assert(xen_enabled());
pci_conf = dev->config;
pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
pci_config_set_prog_interface(pci_conf, 0);
pci_conf[... | vuln | Safe | C/C++ |
void qmp_blockdev_backup(BlockdevBackup *arg, Error **errp)
{
do_blockdev_backup(arg, NULL, errp);
} | vuln | Vulnerable | C/C++ |
static av_cold int decode_init(AVCodecContext *avctx)
{
WMAProDecodeCtx *s = avctx->priv_data;
uint8_t *edata_ptr = avctx->extradata;
unsigned int channel_mask;
int i, bits;
int log2_max_num_subframes;
int num_possible_block_sizes;
if (avctx->codec_id == AV_CODEC_ID_XMA1 || avctx->codec_id =... | vuln | Safe | C/C++ |
int snd_timer_close(struct snd_timer_instance *timeri)
{
struct snd_timer *timer = NULL;
struct snd_timer_instance *slave, *tmp;
if (snd_BUG_ON(!timeri))
return -ENXIO;
/* force to stop the timer */
snd_timer_stop(timeri);
if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE) {
/* wait, until the active callback is ... | vuln | Safe | C/C++ |
@SubscribeEvent
public void onOverlayDrawn(RenderGameOverlayEvent.Post event) {
if(((event.type == null && Loader.isModLoaded("labymod")) ||
event.type == RenderGameOverlayEvent.ElementType.CROSSHAIRS)) {
ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem();
... | vuln | Safe | Java |
const compare = (value, pattern, options) => {
/*
* Special for debugging
* */
const res = (result) => {
let val = '';
if (!pattern || ((typeof pattern !== 'object') && (typeof pattern !== 'string') && typeof pattern !== 'function')) {
val = String(pattern)
} else if ... | vuln | Vulnerable | JavaScript |
CollationCreate(const char *collname, Oid collnamespace,
Oid collowner,
char collprovider,
bool collisdeterministic,
int32 collencoding,
const char *collcollate, const char *collctype,
const char *collversion,
bool if_not_exists,
bool quiet)
{
Relation rel;
TupleDesc tupDesc;
HeapTupl... | vuln | Safe | Unknown |
def create_app(
blocks: gradio.Blocks, app_kwargs: Dict[str, Any] | None = None
) -> App:
app_kwargs = app_kwargs or {}
app_kwargs.setdefault("default_response_class", ORJSONResponse)
app = App(**app_kwargs)
app.configure_app(blocks)
app.add_middleware(
C... | vuln | Safe | Python |
/******************************************************************************
* main.c
*
* pdfresurrect - PDF history extraction tool
*
* Copyright (C) 2008-2010, 2012, 2017, 2019 Matt Davis (enferex).
*
* Special thanks to all of the contributors: See AUTHORS.
*
* Special thanks to 757labs (757 crew), the... | vuln | Safe | C/C++ |
static void process_tns_coeffs(TemporalNoiseShaping *tns, double *coef_raw,
int *order_p, int w, int filt)
{
int i, j, order = *order_p;
int *idx = tns->coef_idx[w][filt];
float *lpc = tns->coef[w][filt];
float temp[TNS_MAX_ORDER] = {0.0f}, out[TNS_MAX_ORDER] = {0.0f};
... | vuln | Vulnerable | C/C++ |
/*
* RAW MPEG-4 video demuxer
* Copyright (c) 2006 Thijs Vermeir <thijs.vermeir@barco.com>
*
* This file is part of Libav.
*
* Libav 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
* ve... | vuln | Safe | C/C++ |
static bool io_match_task_safe(struct io_kiocb *head, struct task_struct *task,
bool cancel_all)
{
if (task && head->task != task)
return false;
return cancel_all;
} | vuln | Vulnerable | Unknown |
@Subscribe
public void onEvent(ChromeTabsDismissedEvent event) {
unRegisterEventBus();
if (mOpenBrowserPromise == null) {
return;
}
if (event.isError) {
mOpenBrowserPromise.reject(ERROR_CODE, event.message);
} else {
WritableMap result = Arguments.createMap();
result.putS... | vuln | Safe | Java |
libxlDomainEventHandler(void *data, libxl_event *event)
{
libxlDriverPrivate *driver = data;
libxl_shutdown_reason xl_reason = event->u.domain_shutdown.shutdown_reason;
g_autoptr(libxlDriverConfig) cfg = NULL;
struct libxlEventHandlerThreadInfo *thread_info = NULL;
virThread thread;
g_autofree c... | vuln | Safe | Unknown |
def append_dyn_array(darray_node, elem_node):
assert isinstance(darray_node.typ, DArrayT)
assert darray_node.typ.count > 0, "jerk boy u r out"
ret = ["seq"]
with darray_node.cache_when_complex("darray") as (b1, darray_node):
len_ = get_dyn_array_count(darray_node)
with len_.cache_when_... | vuln | Safe | Python |
void MediaStreamManager::OpenDevice(int render_process_id,
int render_frame_id,
int page_request_id,
const std::string& device_id,
MediaStreamType type,
... | vuln | Vulnerable | C/C++ |
def _persist_run_single(self, run: Run) -> None:
"""Persist a run."""
if run.parent_run_id is None:
run.reference_example_id = self.example_id
run_dict = run.dict(exclude={"child_runs"})
extra = run_dict.get("extra", {})
extra["runtime"] = get_runtime_environment()
... | vuln | Vulnerable | Python |
/*
* Copyright (C) 2015 Red Hat, Inc.
* All Rights Reserved.
*
* 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, co... | vuln | Vulnerable | C/C++ |
public static void navigateToURLWithBasicAuthentication(WebDriver driver, String targetUrl, String username, String password, String targetUrlAfterAuthentication) {
String domainName = getDomainNameFromURL(targetUrl);
String driverName = DriverFactoryHelper.getTARGET_DRIVER_NAME();
if (driverNam... | vuln | Safe | Java |
int open_debug_log(void) {
/* don't do anything if we're not actually running... */
if(verify_config || test_scheduling == TRUE)
return OK;
/* don't do anything if we're not debugging */
if(debug_level == DEBUGL_NONE)
return OK;
if((debug_file_fp = fopen(debug_file, "a+")) == NULL)
return ERROR;
... | vuln | Vulnerable | C/C++ |
private void initModel(Annotation model) {
scale = new Scale(1, 1);
translate = new Translate(PADDING, PADDING);
rotate = new Rotate();
board.getTransforms().setAll(scale, rotate);
scale.addEventHandler(TransformChangedEvent.TRANSFORM_CHANGED, event -> {
// Maintain constant padd... | vuln | Safe | Java |
lldpd_alloc_mgmt(int family, void *addrptr, size_t addrsize, u_int32_t iface)
{
struct lldpd_mgmt *mgmt;
log_debug("alloc", "allocate a new management address (family: %d)", family);
if (family <= LLDPD_AF_UNSPEC || family >= LLDPD_AF_LAST) {
errno = EAFNOSUPPORT;
return NULL;
}
if (addrsize > LLDPD_MGMT_MAX... | vuln | Safe | Unknown |
int h2_make_htx_request(struct http_hdr *list, struct htx *htx, unsigned int *msgf, unsigned long long *body_len)
{
struct ist phdr_val[H2_PHDR_NUM_ENTRIES];
uint32_t fields; /* bit mask of H2_PHDR_FND_* */
uint32_t idx;
int ck, lck; /* cookie index and last cookie index */
int phdr;
int ret;
int i;
struct htx_... | vuln | Safe | Unknown |
private static Config createConfig() {
try {
File file = configPath.toFile();
if (file.exists() && file.isFile()) {
return new GsonBuilder()
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeAdapter())
.create()
... | vuln | Vulnerable | Java |
@VisibleForTesting
@GuardedBy("mEventsLock")
void readEventsLocked(InputStream stream) throws IOException {
try {
TypedXmlPullParser parser = Xml.resolvePullParser(stream);
int type;
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
&& t... | vuln | Safe | Java |
encryptPassword: function(password) {
if (!password) return '';
return bcrypt.hashSync(password, 10);
} | vuln | Safe | JavaScript |
public static HttpClientInterface makeHttpClient(boolean usePool) {
return new HttpClientInterface() {
private CloseableHttpClient httpClient = null;
private synchronized CloseableHttpClient getHttpClient4() {
if (httpClient == null) {
HttpClientBuilder httpClientBuilder = HttpClients.custom();
... | vuln | Safe | Java |
static void write_outfile(QPDF& pdf, Options& o)
{
if (o.split_pages)
{
// Generate output file pattern
std::string before;
std::string after;
size_t len = strlen(o.outfilename);
char* num_spot = strstr(const_cast<char*>(o.outfilename), "%d");
if (num_spot != 0)
... | vuln | Vulnerable | Unknown |
static void transit(h2_session *session, const char *action, h2_session_state nstate)
{
apr_time_t timeout;
int ostate, loglvl;
const char *s;
if (session->state != nstate) {
ostate = session->state;
session->state = nstate;
loglvl = APLOG_DEBUG;
if ((ostate... | vuln | Vulnerable | Unknown |
expand_string_integer(uschar *string, BOOL isplus)
{
return expanded_string_integer(expand_string(string), isplus);
}
/*************************************************
* Interpret string as an integer *
*************************************************/
/* Convert a string (that has already been e... | vuln | Safe | C/C++ |
WandPrivate void CLINoImageOperator(MagickCLI *cli_wand,
const char *option,const char *arg1n,const char *arg2n)
{
const char /* percent escaped versions of the args */
*arg1,
*arg2;
#define _image_info (cli_wand->wand.image_info)
#define _images (cli_wand->wand.images)
#define _exception ... | vuln | Vulnerable | C/C++ |
void SFS_ArrayDeref(ScriptParser *parser)
{
if (parser->codec->LastError) return;
SFS_Expression(parser);
SFS_AddString(parser, "[");
SFS_CompoundExpression(parser);
SFS_AddString(parser, "]");
} | vuln | Vulnerable | Unknown |
int gnutls_init(gnutls_session_t * session, unsigned int flags)
{
int ret;
FAIL_IF_LIB_ERROR;
*session = gnutls_calloc(1, sizeof(struct gnutls_session_int));
if (*session == NULL)
return GNUTLS_E_MEMORY_ERROR;
ret = gnutls_mutex_init(&(*session)->internals.post_negotiation_lock);
if (ret < 0) {
gnutls_asse... | vuln | Vulnerable | Unknown |
private int getScrollStep() {
if(subComponents.isEmpty()) {
return 0;
}
return (subComponents.get(0).getBounds().getHeight() + getSpacing());
} | vuln | Safe | Java |
def _build_service_param(self, args: Dict[str, str]) -> str:
"""
Generates a value to use as the "service" parameter when redirecting or
querying the CAS service.
Args:
args: Additional arguments to include in the final redirect URL.
Returns:
The URL to ... | vuln | Safe | Python |
/**
* An element which displays a table of events on a repository and allows them to be
* edited.
*/
angular.module('quay').directive('repositoryEventsTable', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/repository-events-table.html',
replace: false,
... | vuln | Vulnerable | JavaScript |
# -*- 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 | Safe | Python |
static void vapic_map_rom_writable(VAPICROMState *s)
{
hwaddr rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK;
MemoryRegionSection section;
MemoryRegion *as;
size_t rom_size;
uint8_t *ram;
as = sysbus_address_space(&s->busdev);
if (s->rom_mapped_writable) {
memory_region_del_subregio... | vuln | Vulnerable | C/C++ |
static int decode_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src)
{
H264Context *h = dst->priv_data, *h1 = src->priv_data;
int inited = h->context_initialized, err = 0;
int context_reinitialized = 0;
int i, ret;
if (dst == src)
re... | vuln | Safe | C/C++ |
coolkey_add_object(coolkey_private_data_t *priv, unsigned long object_id, const u8 *object_data, size_t object_length, int add_v1_record)
{
sc_cardctl_coolkey_object_t new_object;
int r;
memset(&new_object, 0, sizeof(new_object));
new_object.path = coolkey_template_path;
new_object.path.len = 4;
ulong2bebytes(ne... | vuln | Vulnerable | Unknown |
package com.salesmanager.shop.admin.controller.products;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.salesmanager.core.business.services.catalog.category.CategoryService;
import com.salesmanager.core.business.services.catalog.product.ProductService;
import com.salesmanager.core.business.services.cat... | vuln | Vulnerable | Java |
var execFile = require('child_process').execFile;
module.exports = function (iface, callback) {
execFile("cat", ["/sys/class/net/" + iface + "/address"], function (err, out) {
if (err) {
callback(err, null);
return;
}
callback(null, out.trim().toLowerCase());
});... | vuln | Safe | Java |
static int mkv_write_chapters(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
AVIOContext *pb = s->pb;
ebml_master chapters, editionentry;
AVRational scale = {1, 1E9};
int i, ret;
if (!s->nb_chapters || mkv->wrote_chapters)
return 0;
ret = mkv_add_seekhead_entry(mkv->ma... | vuln | Safe | C/C++ |
swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc)
{
uint16* wp = (uint16*) cp0;
tmsize_t wc = cc / 2;
horDiff16(tif, cp0, cc);
TIFFSwabArrayOfShort(wp, wc);
} | vuln | Vulnerable | C/C++ |
@Override
public void callSessionHoldFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
TelephonyUtils.runWithCleanCallingIdentity(()-> mListener.callSessionHoldFailed(
ImsCallSession.this, reasonInfo), mListenerExecutor);
}
} | vuln | Vulnerable | Java |
def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
# XXX see if we want to keep an external call here
if verbose:
zipoptions = "-r"
else:
zipoptions = "-rq"
from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
try:
s... | vuln | Vulnerable | Python |
pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
{
pfarg_context_t *req = (pfarg_context_t *)arg;
struct file *filp;
int ctx_flags;
int ret;
/* let's check the arguments first */
ret = pfarg_is_sane(current, req);
if (ret < 0) return ret;
ctx_flags = req->ctx_flags;
ret = -... | vuln | Vulnerable | Unknown |
static void extrapolate_isf(float isf[LP_ORDER_16k])
{
float diff_isf[LP_ORDER - 2], diff_mean;
float *diff_hi = diff_isf - LP_ORDER + 1;
float corr_lag[3];
float est, scale;
int i, i_max_corr;
isf[LP_ORDER_16k - 1] = isf[LP_ORDER - 1];
for (i = 0; i < LP_ORDER - 2; i++)
diff_i... | vuln | Vulnerable | C/C++ |
function peg$parsefilters() {
var s0, s1, s2, s3, s4;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 124) {
s3 = peg$c37;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) ... | vuln | Vulnerable | JavaScript |
def _yaml_to_config(self, config_file):
self.config = yaml.load(config_file) | vuln | Vulnerable | Python |
static void xbr3x(AVFrame *input, AVFrame *output, const uint32_t *r2y)
{
const int nl = output->linesize[0]>>2;
const int nl1 = nl + nl;
int x,y;
for (y = 0; y < input->height; y++) {
uint32_t * E = (uint32_t *)(output->data[0] + y * output->linesize[0] * 3);
uint32_t * sa2 = (... | vuln | Safe | C/C++ |
private void processCertFilter(
CMSTemplateParams argSet,
IArgBlock header,
int maxCount,
BigInteger sentinel,
int totalRecordCount,
String serialTo,
String filter,
HttpServletRequest req,
HttpServletResponse res... | vuln | Safe | Java |
LOCAL int find_address_in_search_tree(MMDB_s *mmdb, uint8_t *address,
sa_family_t address_family,
MMDB_lookup_result_s *result)
{
record_info_s record_info = record_info_for_database(mmdb);
if (0 == record_info.right_record_offset) {
... | vuln | Safe | Unknown |
package command
import (
"time"
"github.com/zitadel/zitadel/internal/eventstore"
"github.com/zitadel/zitadel/internal/domain"
"github.com/zitadel/zitadel/internal/repository/user"
)
type HumanRefreshTokenWriteModel struct {
eventstore.WriteModel
TokenID string
RefreshToken string
UserState domai... | vuln | Safe | Go |
'use strict'
const Router = require('express').Router
const formidable = require('formidable')
const path = require('path')
const fs = require('fs')
const os = require('os')
const rimraf = require('rimraf')
const isSvg = require('is-svg')
const config = require('../../config')
const logger = require('../../logger')
c... | vuln | Vulnerable | JavaScript |
static MagickBooleanType ReadPSDChannel(Image *image,
const ImageInfo *image_info,const PSDInfo *psd_info,LayerInfo* layer_info,
const size_t channel,const PSDCompressionType compression,
ExceptionInfo *exception)
{
Image
*channel_image,
*mask;
MagickOffsetType
offset;
MagickBooleanType
st... | vuln | Vulnerable | C/C++ |
read_one_cert (ReadFromGConfInfo *info,
const char *setting_name,
const char *key,
gboolean fail_if_missing,
GError **error)
{
char *value = NULL;
if (nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &value)) {
if (fail_if_missing &... | vuln | Safe | Unknown |
slap_modrdn2mods(
Operation *op,
SlapReply *rs )
{
int a_cnt, d_cnt;
LDAPRDN old_rdn = NULL;
LDAPRDN new_rdn = NULL;
assert( !BER_BVISEMPTY( &op->oq_modrdn.rs_newrdn ) );
/* if requestDN is empty, silently reset deleteOldRDN */
if ( BER_BVISEMPTY( &op->o_req_dn ) ) op->orr_deleteoldrdn = 0;
if ( ldap_bv2... | vuln | Safe | C/C++ |
public function generateRandomKey($length = 32)
{
if (!is_int($length)) {
throw new InvalidArgumentException('First parameter ($length) must be an integer');
}
if ($length < 1) {
throw new InvalidArgumentException('First parameter ($length) must be greater than 0');
... | vuln | Vulnerable | PHP |
def patch(self, id):
"""Update node
---
description: >-
Update the node specified by the id. Only a user or node that belongs
to the organization of the node are allowed to update it.\n
If the node does not exists it is created as a new node.\n
### Permis... | vuln | Vulnerable | Python |
GF_Err urn_Read(GF_Box *s, GF_BitStream *bs)
{
u32 i, to_read;
char *tmpName;
GF_DataEntryURNBox *ptr = (GF_DataEntryURNBox *)s;
if (! ptr->size ) return GF_OK;
to_read = (u32) ptr->size;
tmpName = (char*)gf_malloc(sizeof(char) * to_read);
if (!tmpName) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, tmpName, to_rea... | vuln | Safe | C/C++ |
TPM_RC
TPML_CCA_Unmarshal(TPML_CCA *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
UINT32 i;
if (rc == TPM_RC_SUCCESS) {
rc = UINT32_Unmarshal(&target->count, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
if (target->count > MAX_CAP_CC) {
rc = TPM_RC_SIZE;
}
}
... | vuln | Vulnerable | C/C++ |
function parseCommentForTooltip(comment) {
if (/"TYPE":"PACKAGE_MATERIAL"/.test(comment)) {
var comment_tooltip = "";
var comment_map = JSON.parse(comment);
var package_comment = comment_map['COMMENT'];
var trackback_url = comment_map['TRACKBACK_URL'];
... | vuln | Vulnerable | JavaScript |
static void decode_mb(MpegEncContext *s, int ref)
{
s->dest[0] = s->current_picture.f.data[0] + (s->mb_y * 16 * s->linesize) + s->mb_x * 16;
s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);
s->d... | vuln | Vulnerable | C/C++ |
static void v9fs_unlinkat(void *opaque)
{
int err = 0;
V9fsString name;
int32_t dfid, flags;
size_t offset = 7;
V9fsPath path;
V9fsFidState *dfidp;
V9fsPDU *pdu = opaque;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, offset, "dsd", &dfid, &name, &flags);
if (err < 0) {
... | vuln | Safe | C/C++ |
int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
struct xfrm_migrate *m, int num_migrate,
struct xfrm_kmaddress *k, struct net *net,
struct xfrm_encap_tmpl *encap)
{
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[XFR... | vuln | Vulnerable | C/C++ |
PHP_FUNCTION(symlink)
{
char *topath, *frompath;
int topath_len, frompath_len;
int ret;
char source_p[MAXPATHLEN];
char dest_p[MAXPATHLEN];
char dirname[MAXPATHLEN];
size_t len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) {
return;
}... | vuln | Vulnerable | Unknown |
void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
{
tcp::TCP_ApplicationAnalyzer::DeliverStream(length, line, orig);
if ( starttls )
{
ForwardStream(length, line, orig);
return;
}
// check line size
if ( length > 512 )
{
Weird("irc_line_size_exceeded");
return;
}
strin... | vuln | Safe | Unknown |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
const TfLiteTensor* multipliers = GetInput(context, node, kInputMultipliers);
if (IsDynamicTensor(output)) {
TF_LI... | vuln | Vulnerable | C/C++ |
public boolean produceAtlas() {
try {
drawablePairs.clear();
if (!atlasData.atlasCurrent) {
if (atlas != null) {
atlas.dispose();
atlas = null;
}
FileHandle defaultsFile = Main.appFolder.... | vuln | Vulnerable | Java |
char * ATTRIBUTE_MALLOC
htmlescape (const char *restrict src, const int cp)
{
int len;
char *dest, *d, *end;
unsigned char *s;
if (!src)
return NULL;
len = strlen (src) + 10;
d = calloc (len, 1);
s = (unsigned char *)src;
dest = d;
end = dest + len;
while (*s)
{
const int off = d - des... | vuln | Safe | C/C++ |
static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image *image,*palette;
ImageInfo *clone_info;
MagickBooleanType status;
MagickOffsetType
offset;
size_t EncodedByte;
unsigned char RunCount,RunValue,RunCountMasked;
CUTHeader Header;
CUTPalHeader PalHeader;
ssize... | vuln | Vulnerable | C/C++ |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | vuln | Safe | C/C++ |
async login(ctx) {
const {
body: { password },
} = ctx.request;
const { password: storedPassword } = await strapi
.store({
environment: '',
type: 'plugin',
name: 'documentation',
key: 'config',
})
.get();
const isValid = await strapi.plugins['use... | vuln | Safe | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.