code stringlengths 10 33.4M | task stringclasses 2
values | label stringclasses 121
values | language stringclasses 13
values |
|---|---|---|---|
my_object_emit_signals (MyObject *obj, GError **error)
{
GValue val = {0, };
g_signal_emit (obj, signals[SIG0], 0, "foo", 22, "moo");
g_value_init (&val, G_TYPE_STRING);
g_value_set_string (&val, "bar");
g_signal_emit (obj, signals[SIG1], 0, "baz", &val);
g_value_unset (&val);
return TRUE;
} | vuln | Vulnerable | C/C++ |
void isis_notif_version_skew(const struct isis_circuit *circuit,
uint8_t version, const char *raw_pdu,
size_t raw_pdu_len)
{
const char *xpath = "/frr-isisd:version-skew";
struct list *arguments = yang_data_list_new();
char xpath_arg[XPATH_MAXLEN];
struct yang_data *data;
struct isis_area *area = c... | vuln | Vulnerable | Unknown |
static void start_daemon()
{
// Capture USB device if not in no-printer mode
struct usb_sock_t *usb_sock;
if (g_options.noprinter_mode == 0) {
usb_sock = usb_open();
if (usb_sock == NULL)
goto cleanup_usb;
} else
usb_sock = NULL;
// Capture a socket
uint16_t desired_port = g_options.desired_port;
struc... | vuln | Safe | C/C++ |
static av_cold int ljpeg_encode_init(AVCodecContext *avctx)
{
LJpegEncContext *s = avctx->priv_data;
if ((avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
avctx->pix_fmt == AV_PIX_FMT_YUV444P ||
avctx->color_range == AVCOL_RANGE_MPEG) &&
avctx->s... | vuln | Vulnerable | C/C++ |
showEmptyFolder: function (albumPath, errorMessage) {
var message = '<div class="icon-gallery"></div>';
var uploadAllowed = true;
this.element.children().detach();
this.removeLoading();
if (!_.isUndefined(errorMessage) && errorMessage !== null) {
message += '<h2>' + t('gallery',
'Album cannot... | vuln | Safe | PHP |
void CiffDirectory::readDirectory(const byte* pData,
uint32_t size,
ByteOrder byteOrder)
{
if (size < 4)
throw Error(kerCorruptedMetadata);
uint32_t o = getULong(pData + size - 4, byteOrder);
if ( o+... | vuln | Vulnerable | Unknown |
package org.airsonic.player.security;
import org.airsonic.player.service.JWTSecurityService;
import org.airsonic.player.service.SecurityService;
import org.airsonic.player.service.SettingsService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springfra... | vuln | Safe | Java |
private void notifyStartedRunning(@NonNull BroadcastProcessQueue queue) {
if (queue.app != null) {
queue.app.mReceivers.incrementCurReceivers();
// Don't bump its LRU position if it's in the background restricted.
if (mService.mInternal.getRestrictionLevel(
... | vuln | Safe | Java |
def lstat(self) -> stat_result:
"""Like stat() except that it doesn't follow symlinks."""
return self.stat(follow_symlinks=False) | vuln | Safe | Python |
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | vuln | Vulnerable | Python |
void vncws_handshake_read(void *opaque)
{
VncState *vs = opaque;
uint8_t *handshake_end;
long ret;
buffer_reserve(&vs->ws_input, 4096);
ret = vnc_client_read_buf(vs, buffer_end(&vs->ws_input), 4096);
if (!ret) {
if (vs->csock == -1) {
vnc_disconnect_finish(vs);
}
... | vuln | Vulnerable | C/C++ |
/*
# probe.c: Code for probing protocols
#
# Copyright (C) 2007-2021 Yves Rutschle
#
# 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 2 of the License, or (at your option) any ... | vuln | Safe | C/C++ |
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
systemd 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... | vuln | Safe | C/C++ |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file implements rat-to-string conversion functions.
package big
import (
"errors"
"fmt"
"io"
"strconv"
"strings"
)
func ratTok(ch rune) bool {
... | vuln | Safe | Go |
public boolean prefilterMarket(MarketAPI market, FactionAPI faction) {
//StarSystemAPI system = market.getStarSystem();
// don't colonize core world systems except to repopulate decivilized worlds
/*
if (ExerelinUtilsAstro.isCoreSystem(system)) {
//if (!faction.getId().equals(ExerelinUtilsMarket.getOriginalO... | vuln | Safe | Java |
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'
import './projectAccessRights.html'
import { t, i18nReady } from '../../utils/i18n.js'
import {
validateEmail, getGlobalSetting, showToast, addToolTipToTableCell,
} from '../../utils/frontend_helpers'
import Projects from '../../api/projects/projects.js'
T... | vuln | Safe | JavaScript |
static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index,
int64_t *pos_arg, int64_t pos_limit)
{
struct ogg *ogg = s->priv_data;
AVIOContext *bc = s->pb;
int64_t pts = AV_NOPTS_VALUE;
int i = -1;
avio_seek(bc, *pos_arg, SEEK_SET);
ogg_reset(ogg);
... | vuln | Safe | C/C++ |
public void updatePositionAbsolute(DataTypeProvider provider) {
this.executor.execute(() -> attempt(() -> {
Entity ent = entities.get(provider.readVarInt());
if (ent != null) {
ent.readPosition(provider);
}
}));
} | vuln | Safe | Java |
public double getZOffset(double[] candidateCoords) throws Exception {
double zOffset = 0;
location = -1;
minElevation = Double.MAX_VALUE;
if (saxParser == null) {
// Use the default (non-validating) parser
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
saxParser = factory.newSAXP... | vuln | Vulnerable | Java |
/**
* Copyright (c) 2006-2012, JGraph Ltd
*/
/**
* Construcs a new sidebar for the given editor.
*/
function Sidebar(editorUi, container)
{
this.editorUi = editorUi;
this.container = container;
this.palettes = new Object();
this.taglist = new Object();
this.lastCreated = 0;
this.showTooltips = true;
this.gra... | vuln | Safe | Java |
"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return ne... | vuln | Safe | JavaScript |
@PUT
@ManagedAsync
@ApiOperation(
value = "Replace data at a path in a document",
notes = "Removes whatever was previously present at the path")
@ApiResponses(
value = {
@ApiResponse(code = 200, message = "OK", response = WriteDocResponse.class),
@ApiResponse(code = 400, message ... | vuln | Vulnerable | Java |
static void labeljumps(JF, js_JumpList *jump, int baddr, int caddr)
{
while (jump) {
if (jump->type == STM_BREAK)
labelto(J, F, jump->inst, baddr);
if (jump->type == STM_CONTINUE)
labelto(J, F, jump->inst, caddr);
jump = jump->next;
}
} | vuln | Vulnerable | C/C++ |
private ServiceResponse executePost(ServiceRequest request, ServiceResponse response) {
String urlPath = request.getUrlPath();
if (urlPath == null || urlPath.equals("/")) {
return errorResponse(response, 400, POST_ONLY_ALLOWED_TO_COLLECTIONS);
}
PersistenceManager pm = getPm... | vuln | Safe | Java |
TfLiteStatus ResizeOutputTensors(TfLiteContext* context, TfLiteNode* node,
const TfLiteTensor* axis,
const TfLiteTensor* input, int num_splits) {
int axis_value = GetTensorData<int>(axis)[0];
if (axis_value < 0) {
axis_value += NumDimensions(inpu... | vuln | Safe | C/C++ |
static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
RPLContext *rpl = s->priv_data;
AVIOContext *pb = s->pb;
AVStream* stream;
AVIndexEntry* index_entry;
int ret;
if (rpl->chunk_part == s->nb_streams) {
rpl->chunk_number++;
rpl->chunk_part = 0;
}
stream = s->s... | vuln | Safe | C/C++ |
int
add_mibfile(const char* tmpstr, const char* d_name, FILE *ip )
{
FILE *fp;
char token[MAXTOKEN], token2[MAXTOKEN];
/*
* which module is this
*/
if ((fp = fopen(tmpstr, "r")) == NULL) {
snmp_log_perror(tmpstr);
return 1;
}
DEBUGMSGTL(("parse-mi... | vuln | Vulnerable | C/C++ |
ciphertext_to_compressed (gnutls_session_t session,
gnutls_datum_t *ciphertext,
uint8_t * compress_data,
int compress_size,
uint8_t type, record_parameters_st * params,
uint64* sequence)
{... | vuln | Vulnerable | Unknown |
TPMI_ECC_CURVE_Unmarshal(TPMI_ECC_CURVE *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPM_ECC_CURVE_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target) {
#if ECC_BN_P256
case TPM_ECC_BN_P256:
#endif
#if ECC_BN_P638... | vuln | Vulnerable | Unknown |
private void internalUpdateSubscriptionPropertiesForNonPartitionedTopic(AsyncResponse asyncResponse,
String subName, Map<String, String> subscriptionProperties,
boolean authoritative) {
validateTopicOwnershipAsync(topicName, authoritati... | vuln | Safe | Java |
@Override
public void unSubscribe(String topic, int partition) {
TopicPartition topicPartition = new TopicPartition(topic, partition);
PartitionWiseSharedKafkaConsumer consumer = sharedKafkaConsumerMap.get(topicPartition);
if (consumer == null) {
logger.warn("No shared consumer found for t... | vuln | Safe | Java |
int X509_verify_cert(X509_STORE_CTX *ctx)
{
X509 *x,*xtmp,*chain_ss=NULL;
int bad_chain = 0;
X509_VERIFY_PARAM *param = ctx->param;
int depth,i,ok=0;
int num;
int (*cb)(int xok,X509_STORE_CTX *xctx);
STACK_OF(X509) *sktmp=NULL;
if (ctx->cert == NULL)
{
X509err(X509_F_X509_VERIFY_CERT,X509_R_NO_CERT_SET_FOR... | vuln | Safe | Unknown |
void fp48_write_bin(uint8_t *bin, int len, const fp48_t a, int pack) {
fp48_t t;
fp48_null(t);
RLC_TRY {
fp48_new(t);
if (pack) {
if (len != 32 * RLC_FP_BYTES) {
RLC_THROW(ERR_NO_BUFFER);
}
fp48_pck(t, a);
fp8_write_bin(bin, 8 * RLC_FP_BYTES, a[0][1]);
fp8_write_bin(bin + 8 * RLC_FP_BYTES, ... | vuln | Vulnerable | C/C++ |
import $ from "jquery";
import tippy, {delegate} from "tippy.js";
import {$t} from "./i18n";
import * as message_lists from "./message_lists";
import * as popover_menus from "./popover_menus";
import * as reactions from "./reactions";
import * as rows from "./rows";
import * as timerender from "./timerender";
// We o... | vuln | Safe | JavaScript |
static void local_socket_close_locked(asocket* s) {
static void local_socket_close(asocket* s) {
D("entered local_socket_close. LS(%d) fd=%d", s->id, s->fd);
std::lock_guard<std::recursive_mutex> lock(local_socket_list_lock);
if (s->peer) {
D("LS(%d): closing peer. peer->id=%d peer->fd=%d", s->id,... | vuln | Safe | C/C++ |
static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
{
hdlc_device *hdlc = dev_to_hdlc(frad);
pvc_device *pvc;
struct net_device *dev;
int used;
if ((pvc = add_pvc(frad, dlci)) == NULL) {
netdev_warn(frad, "Memory squeeze on fr_add_pvc()\n");
return -ENOBUFS;
}
if (*get_dev_p(pvc, ty... | vuln | Vulnerable | Unknown |
static int ehci_process_itd(EHCIState *ehci,
EHCIitd *itd,
uint32_t addr)
{
USBDevice *dev;
USBEndpoint *ep;
uint32_t i, len, pid, dir, devaddr, endp;
uint32_t pg, off, ptr1, ptr2, max, mult;
ehci->periodic_sched_active = PERIODIC_ACTIVE;
... | vuln | Vulnerable | Unknown |
gdk_pixbuf_from_pixdata (const GdkPixdata *pixdata,
gboolean copy_pixels,
GError **error)
{
guint encoding, bpp;
guint8 *data = NULL;
g_return_val_if_fail (pixdata != NULL, NULL);
g_return_val_if_fail (pixdata->width > 0, NULL);
g_return_val_if_fail (pixdata->height > 0, NULL);
g_... | vuln | Vulnerable | Unknown |
MagickExport void XListBrowserWidget(Display *display,XWindows *windows,
XWindowInfo *window_info,const char *const *list,const char *action,
const char *query,char *reply)
{
#define CancelButtonText "Cancel"
char
primary_selection[MaxTextExtent];
int
x;
int
i;
static MagickStatusType
m... | vuln | Safe | Unknown |
function H(ia){if(ba!=ia||P!=da)A(),Aa.scrollTop=0,ea.innerText="",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Ha.spin(ea),U=!1,V=!0,d(ia,ua,function(){z(mxResources.get("searchFailed"));
ua([])},P?null:n)):I(P)),ba=ia,da=P} | vuln | Safe | JavaScript |
static void term_print_cmdline (const char *cmdline)
{
term_show_prompt();
term_printf("%s", cmdline);
term_flush();
} | vuln | Safe | C/C++ |
bool CmdLine::store( const std::vector<std::string>& argv,
boost::program_options::options_description& visible,
boost::program_options::options_description& hidden,
boost::program_options::positional_options_description& positional,
... | vuln | Safe | Unknown |
/*
* Copyright (C) 2006 The Android Open Source Project
*
* 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 app... | vuln | Safe | Java |
xfs_ioctl_setattr(
xfs_inode_t *ip,
struct fsxattr *fa,
int mask)
{
struct xfs_mount *mp = ip->i_mount;
struct xfs_trans *tp;
unsigned int lock_flags = 0;
struct xfs_dquot *udqp = NULL;
struct xfs_dquot *pdqp = NULL;
struct xfs_dquot *olddquot = NULL;
int code;
trace_xfs_ioctl_setattr(ip);
if (mp->... | vuln | Vulnerable | C/C++ |
parse_charstrings( T1_Face face,
T1_Loader loader )
{
T1_Parser parser = &loader->parser;
PS_Table code_table = &loader->charstrings;
PS_Table name_table = &loader->glyph_names;
PS_Table swap_table = &loader->swap_table;
FT_Memory me... | vuln | Vulnerable | C/C++ |
private CompletableFuture<Void> handleHandshake(ChannelHandlerContext ctx, Handshake packet) {
String data = packet.getHost();
return handler.handle(ctx.channel(), data).thenAccept(result -> {
HandshakeData handshakeData = result.getHandshakeData();
// we'll change the IP addre... | vuln | Safe | Java |
static void sched_feat_enable(int i)
{
static_key_enable(&sched_feat_keys[i]);
} | vuln | Vulnerable | C/C++ |
void PrintPreviewDataService::RemoveEntry(
const std::string& preview_ui_addr_str) {
PreviewDataStoreMap::iterator it = data_store_map_.find(preview_ui_addr_str);
if (it != data_store_map_.end())
data_store_map_.erase(it);
} | vuln | Vulnerable | C/C++ |
static unsigned long mmap_legacy_base(unsigned long rnd)
{
if (mmap_is_ia32())
return TASK_UNMAPPED_BASE;
else
return TASK_UNMAPPED_BASE + rnd;
} | vuln | Vulnerable | C/C++ |
TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
{
static const char module[] = "TIFFReadBufferSetup";
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
tif->tif_flags &= ~TIFF_BUFFERMMAP;
if (tif->tif_rawdata) {
if (tif->tif_flags & TIFF_MYBUFFER)
_TIFFfree(tif->tif_rawdata);
tif->tif_rawdata = NULL;
t... | vuln | Safe | Unknown |
static inline int mpeg1_decode_block_inter(MpegEncContext *s, int16_t *block, int n)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix = s->inter_matrix;
const int qscale = s->qscale;
{
... | vuln | Vulnerable | C/C++ |
static int vapic_enter(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = vcpu->arch.apic;
struct page *page;
if (!apic || !apic->vapic_addr)
return 0;
page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT);
if (is_error_page(page))
return -EFAULT;
vcpu->arch.apic->vapic_page = page;
return 0;
} | vuln | Vulnerable | C/C++ |
static xls_error_t xls_preparseWorkSheet(xlsWorkSheet* pWS)
{
BOF tmp;
BYTE* buf = NULL;
xls_error_t retval = LIBXLS_OK;
verbose ("xls_preparseWorkSheet");
if (ole2_seek(pWS->workbook->olestr,pWS->filepos) == -1) {
retval = LIBXLS_ERROR_SEEK;
goto cleanup;
}
do
{
size... | vuln | Vulnerable | C/C++ |
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | vuln | Vulnerable | Python |
@Override
public String getParameter(String parameter) {
String value = super.getParameter(parameter);
if (value!=null && "tenant".equals(parameter)) {
// Check that the content of this special parameter is a tenant name
Pattern scriptPattern = Pattern.compile("[\\)\"'\\.,;*?!%/\\(\\\\]", Pattern.CASE_INSENS... | vuln | Safe | Java |
static char **split_line(const SERVER_REC *server, const char *line,
const char *target, int len)
{
const char *start = settings_get_str("split_line_start");
const char *end = settings_get_str("split_line_end");
gboolean onspace = settings_get_bool("split_line_on_space");
char *recoded_start = recode_out(server... | vuln | Safe | Unknown |
int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_function, void* exec_payload, lxc_attach_options_t* options, pid_t* attached_process)
{
int ret, status;
pid_t init_pid, pid, attached_pid, expected;
struct lxc_proc_context_info *init_ctx;
char* cwd;
char* new_cwd;
int ipc_sockets[2];
... | vuln | Vulnerable | C/C++ |
static int get_siz(J2kDecoderContext *s)
{
int i, ret;
if (s->buf_end - s->buf < 36)
return AVERROR(EINVAL);
bytestream_get_be16(&s->buf);
s->width = bytestream_get_be32(&s->buf);
s->height = bytestream_get_be32(&s->buf);
s->image_offset_x = bytest... | vuln | Safe | C/C++ |
long mkvparser::UnserializeString(IMkvReader* pReader, long long pos,
long long size_, char*& str) {
delete[] str;
str = NULL;
if (size_ >= LONG_MAX) // we need (size+1) chars
return E_FILE_FORMAT_INVALID;
const long size = static_cast<long>(size_);
str = new (s... | vuln | Vulnerable | C/C++ |
/**
Onion HTTP server library
Copyright (C) 2010-2021 David Moreno Montero and others
This library is free software; you can redistribute it and/or
modify it under the terms of, at your choice:
a. the Apache License Version 2.0.
b. the GNU General Public License as published by the
Free Software Founda... | vuln | Vulnerable | C/C++ |
obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
{
int isinstance;
PyObject *tmp = NULL;
if (obj == Py_None) {
*out = NULL;
return 0;
}
isinstance = PyObject_IsInstance(obj, (PyObject*)Slice_type);
if (isinstance == -1) {
return 1;
}
if (isinstance) {... | vuln | Vulnerable | C/C++ |
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 | Vulnerable | Go |
def _get_3par_hostname_from_wwn_iqn(self, wwns_iqn):
out = self._cli_run(['showhost', '-d'])
# wwns_iqn may be a list of strings or a single
# string. So, if necessary, create a list to loop.
if not isinstance(wwns_iqn, list):
wwn_iqn_list = [wwns_iqn]
else:
... | vuln | Safe | Python |
XStoreName (
register Display *dpy,
Window w,
_Xconst char *name)
{
if (strlen(name) >= USHRT_MAX)
return 0;
return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, /* */
8, PropModeReplace, (_Xconst unsigned char *)name,
name ? (int) strlen(name) : 0);
} | vuln | Safe | Unknown |
private void setSampleRate()
{
this.sampleRate = SampleRateCalculator.getMaxSupportedSampleRate();
Crashlytics.log(Log.DEBUG, "usedSampleRate", String.valueOf(this.sampleRate));
Log.d("sample rate", String.valueOf(this.sampleRate));
} | vuln | Vulnerable | Java |
static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag,
uint32_t lun)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d);
SCSIRequest *req;
SCSIDiskReq *r;
req = scsi_req_alloc(sizeof(SCSIDiskReq), &s->qdev, tag, lun);
r = DO_UPCAST(SCSIDiskReq, req, req);
r->iov.iov_base =... | vuln | Safe | C/C++ |
def _find_host_exhaustive(self, connector, hosts):
for host in hosts:
ssh_cmd = ['svcinfo', 'lshost', '-delim', '!', host]
out, err = self._run_ssh(ssh_cmd)
self._assert_ssh_return(len(out.strip()),
'_find_host_exhaustive',
... | vuln | Safe | Python |
public void setRouteActionDone(RouteData route) {
if (route == null) return;
alreadyActionedRoutes.add(route);
if (route.getActiveFleet() != null)
route.getActiveFleet().getMemoryWithoutUpdate().set(MEM_KEY_ACTION_DONE, true);
} | vuln | Vulnerable | Java |
[J],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style... | vuln | Safe | JavaScript |
function H(ia){if(ba!=ia||P!=da)A(),Aa.scrollTop=0,ea.innerHTML="",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Ha.spin(ea),U=!1,V=!0,d(ia,ua,function(){z(mxResources.get("searchFailed"));
ua([])},P?null:n)):I(P)),ba=ia,da=P} | vuln | Vulnerable | JavaScript |
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it,
int tag, int aclass, char opt, ASN1_TLC *ctx)
{
const ASN1_TEMPLATE *tt, *errtt = NULL;
const ASN1_COMPAT_FUNCS *cf;
const ASN1_EXTERN_FUNCS *ef;
const ASN1_AUX *aux... | vuln | Safe | Unknown |
e1000e_init_msi(E1000EState *s)
{
int res;
res = msi_init(PCI_DEVICE(s),
0xD0,
1,
true,
false);
if (res > 0) {
s->intr_state |= E1000E_USE_MSI;
} else {
trace_e1000e_msi_init_fail(res);
}
} | vuln | Vulnerable | C/C++ |
unsigned char *ziplistMerge(unsigned char **first, unsigned char **second) {
/* If any params are null, we can't merge, so NULL. */
if (first == NULL || *first == NULL || second == NULL || *second == NULL)
return NULL;
/* Can't merge same list into itself. */
if (*first == *second)
retu... | vuln | Vulnerable | Unknown |
public String toXMLString() throws TransformerConfigurationException, TransformerException {
TransformerFactory tranFactory = TransformerFactory.newInstance();
tranFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
tranFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
... | vuln | Safe | Java |
function merge(source, target) {
for (var key in source) {
var value = source[key];
if (typeof value === 'object' && !Array.isArray(value)) {
target[key] = merge(value, target[key] || {});
} else {
target[key] = key in target ? target[key] : value;
}
}
return target;
} | vuln | Vulnerable | JavaScript |
// imagew-api.c
// Part of ImageWorsener, Copyright (c) 2011 by Jason Summers.
// For more information, see the readme.txt file.
// Most of the functions declared in imagew.h are defined here.
#include "imagew-config.h"
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "imagew-internals.h"
// Tr... | vuln | Vulnerable | C/C++ |
void Document::detach(const AttachContext& context)
{
TRACE_EVENT0("blink", "Document::detach");
RELEASE_ASSERT(!m_frame || m_frame->tree().childCount() == 0);
if (!isActive())
return;
FrameNavigationDisabler navigationDisabler(*m_frame);
HTMLFrameOwnerElement::UpdateSuspendScope suspe... | vuln | Safe | C/C++ |
paged_results_copy_down_controls(TALLOC_CTX *mem_ctx,
struct ldb_control **controls)
{
struct ldb_control **new_controls;
unsigned int i, j, num_ctrls;
if (controls == NULL) {
return NULL;
}
for (num_ctrls = 0; controls[num_ctrls]; num_ctrls++);
new_controls = talloc_array(mem_ctx, struct ldb_control *,... | vuln | Vulnerable | Unknown |
static void nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
NBDReply *reply,
QEMUIOVector *qiov)
{
int ret;
qemu_coroutine_yield();
*reply = s->reply;
if (reply->handle != request->hand... | vuln | Vulnerable | C/C++ |
# -*- coding: utf-8 -*-
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2012-2021 rdiffweb contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version ... | vuln | Vulnerable | Python |
def self.publication_months
result = select("published_at").where("published_at is not NULL").where(type: "Article")
result.map { |it| [it.publication_month] }.uniq
end
# Finds one article which was posted on a certain date and matches the
# supplied dashed-title params is a Hash
def self.requested_art... | vuln | Safe | Ruby |
static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen, unsigned int flags)
{
struct ipv6_pinfo *np = inet6_sk(sk);
int len;
int val;
if (ip6_mroute_opt(optname))
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
if (get_user(len, optlen))
... | vuln | Vulnerable | Unknown |
ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab, LOCKMODE lockmode)
{
ObjectAddress obj;
ListCell *def_item;
ListCell *oid_item;
/*
* Re-parse the index and constraint definitions, and attach them to the
* appropriate work queue entries. We do this before dropping because in
* the case of a F... | vuln | Vulnerable | Unknown |
static MagickBooleanType ConcatenateImages(int argc,char **argv,
ExceptionInfo *exception )
{
FILE
*input,
*output;
int
c;
register ssize_t
i;
if (ExpandFilenames(&argc,&argv) == MagickFalse)
ThrowFileException(exception,ResourceLimitError,"MemoryAllocationFailed",
... | vuln | Vulnerable | C/C++ |
static char* cJSON_strdup( const char* str )
{
size_t len;
char* copy;
len = strlen( str ) + 1;
if ( ! ( copy = (char*) cJSON_malloc( len ) ) )
return 0;
memcpy( copy, str, len );
return copy;
} | vuln | Vulnerable | C/C++ |
static void create_power_zone_common_attributes(
struct powercap_zone *power_zone)
{
int count = 0;
power_zone->zone_dev_attrs[count++] = &dev_attr_name.attr;
if (power_zone->ops->get_max_energy_range_uj)
power_zone->zone_dev_attrs[count++] =
&dev_attr_max_energy_range_uj.attr;
if (power_zone->ops->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 | Vulnerable | Java |
static int get_audio_frame_size(AVCodecContext *enc, int size)
{
int frame_size;
if(enc->codec_id == CODEC_ID_VORBIS)
return -1;
if (enc->frame_size <= 1) {
int bits_per_sample = av_get_bits_per_sample(enc->codec_id);
if (bits_per_sample) {
if (enc->channels == 0)
... | vuln | Safe | C/C++ |
void WebUIExtension::Send(gin::Arguments* args) {
blink::WebLocalFrame* frame;
RenderFrame* render_frame;
if (!ShouldRespondToRequest(&frame, &render_frame))
return;
std::string message;
if (!args->GetNext(&message)) {
args->ThrowError();
return;
}
if (base::EndsWith(message, "RequiringGestu... | vuln | Safe | C/C++ |
// Package hamt implements a Hash Array Mapped Trie over ipfs merkledag nodes.
// It is implemented mostly as described in the wikipedia article on HAMTs,
// however the table size is variable (usually 256 in our usages) as opposed to
// 32 as suggested in the article. The hash function used is currently
// Murmur3, b... | vuln | Vulnerable | Go |
public boolean equals(final Object obj) {
if (! (obj instanceof SunUnixMD5CryptPasswordImpl)) {
return false;
}
SunUnixMD5CryptPasswordImpl other = (SunUnixMD5CryptPasswordImpl) obj;
return iterationCount == other.iterationCount && algorithm.equals(other.algorithm) && Arrays.... | vuln | Vulnerable | Java |
static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb)
{
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EINVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type... | vuln | Vulnerable | Unknown |
/*****************************************************************
|
| AP4 - Atom Based Sample Tables
|
| Copyright 2002-2008 Axiomatic Systems, LLC
|
|
| This atom is part of AP4 (MP4 Audio Processing Library).
|
| Unless you have obtained Bento4 under a difference license,
| this version of Bento4 is B... | vuln | Vulnerable | C/C++ |
/*
* Copyright (c) 2011-2020 Meltytech, LLC
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program i... | vuln | Vulnerable | C/C++ |
static void gen_exception(int excp)
{
TCGv tmp = tcg_temp_new_i32();
tcg_gen_movi_i32(tmp, excp);
gen_helper_exception(tmp);
tcg_temp_free_i32(tmp);
} | vuln | Safe | C/C++ |
static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size,
int stride, int width, int height,
int delta, const uint8_t *ctable, uint8_t *refdata)
{
int i, j;
int code;
int filled = 0;
int orig_height;
if(!refdata)
refdata... | vuln | Vulnerable | C/C++ |
parse_inline(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size)
{
size_t i = 0, end = 0;
uint8_t action = 0;
struct buf work = { 0, 0, 0, 0 };
if (rndr->work_bufs[BUFFER_SPAN].size +
rndr->work_bufs[BUFFER_BLOCK].size > rndr->max_nesting)
return;
while (i < size) {
/* copying inactive ch... | vuln | Vulnerable | Unknown |
snmp_mib_find(uint32_t *oid)
{
snmp_mib_resource_t *resource;
resource = NULL;
for(resource = list_head(snmp_mib);
resource; resource = resource->next) {
if(!snmp_oid_cmp_oid(oid, resource->oid)) {
return resource;
}
}
return NULL;
} | vuln | Vulnerable | C/C++ |
/*
* mapi_attr.c -- Functions for handling MAPI attributes
*
* Copyright (C)1999-2006 Mark Simpson <damned@theworld.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 Foundation; either version 2... | vuln | Vulnerable | C/C++ |
@Override
public void run() {
try {
long start = System.currentTimeMillis();
update(collector.collectData());
synchronized (this) {
timeUsed = System.currentTimeMillis() - start;
++processCounter;
}
} catch (InterruptedE... | vuln | Vulnerable | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.