code
stringlengths
10
33.4M
task
stringclasses
2 values
label
stringclasses
121 values
language
stringclasses
13 values
/** * OLAT - Online Learning and Training<br> * http://www.olat.org * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unl...
vuln
Vulnerable
Java
@NotNull private static Set<CommonModMetadata> getModsAt(Path path, ModsByLocation modMap) { Set<CommonModMetadata> mod = modMap.get(path); if (mod != null) return mod; else if (NecPlatform.instance().isDevelopmentEnvironment()) { // For some reason, in dev, the mod being tested...
vuln
Safe
Java
void WebPImage::readMetadata() { if (io_->open() != 0) throw Error(kerDataSourceOpenFailed, io_->path(), strError()); IoCloser closer(*io_); // Ensure that this is the correct image type if (!isWebPType(*io_, true)) { if (io_->error() || io_->eof()) throw Error(kerFailedT...
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
Safe
Java
static u16 read_16(cdk_stream_t s) { byte buf[2]; size_t nread; assert(s != NULL); stream_read(s, buf, 2, &nread); if (nread != 2) return (u16) - 1; return buf[0] << 8 | buf[1]; }
vuln
Vulnerable
C/C++
/* misc.c : irssi Copyright (C) 1999 Timo Sirainen 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 later version. T...
vuln
Safe
C/C++
static void show_format(WriterContext *w, AVFormatContext *fmt_ctx) { char val_str[128]; int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1; print_section_header("format"); print_str("filename", fmt_ctx->filename); print_int("nb_streams", fmt_ctx->nb_streams); print_str("form...
vuln
Safe
C/C++
file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf, size_t nb) { int m = 0, rv = 0, looks_text = 0; int mime = ms->flags & MAGIC_MIME; const unsigned char *ubuf = CAST(const unsigned char *, buf); unichar *u8buf = NULL; size_t ulen; const char *code = NULL; const char *...
vuln
Safe
Unknown
void mm_release(struct task_struct *tsk, struct mm_struct *mm) { struct completion *vfork_done = tsk->vfork_done; /* Get rid of any futexes when releasing the mm */ #ifdef CONFIG_FUTEX if (unlikely(tsk->robust_list)) exit_robust_list(tsk); #ifdef CONFIG_COMPAT if (unlikely(tsk->compat_robust_list)) compat_exit...
vuln
Safe
C/C++
/** * Copyright (c) 2006-2016, JGraph Ltd */ /** * No CSS and resources available in embed mode. Parameters and docs: * https://www.diagrams.net/doc/faq/embed-html-options */ GraphViewer = function(container, xmlNode, graphConfig) { this.init(container, xmlNode, graphConfig); }; // Editor inherits from mxEventSo...
vuln
Vulnerable
JavaScript
static int su3000_power_ctrl(struct dvb_usb_device *d, int i) { struct dw2102_state *state = (struct dw2102_state *)d->priv; u8 obuf[] = {0xde, 0}; info("%s: %d, initialized %d", __func__, i, state->initialized); if (i && !state->initialized) { state->initialized = 1; /* reset board */ return dvb_usb_generi...
vuln
Vulnerable
Unknown
int econn_message_encode(char **strp, const struct econn_message *msg) { struct json_object *jobj = NULL; char *str = NULL; int err; if (!strp || !msg) return EINVAL; err = jzon_creatf(&jobj, "sss", "version", econn_proto_version, "type", econn_msg_name(msg->msg_type), "sessid", msg->sessid_se...
vuln
Safe
C/C++
@Override public void renderBackground(PoseStack matrix, float partialTick, int mouseX, int mouseY) { showButtons(); Font font = Minecraft.getInstance().font; TranslatableComponent title; if (activeSubPage == null) { // show error page return; } ...
vuln
Safe
Java
TfLiteStatus CheckLstmTensorDimensionsAndTypes( TfLiteContext* context, TfLiteNode* node, int n_input, int n_output, int n_cell, int input_to_input_weights_tensor, int input_to_forget_weights_tensor, int input_to_cell_weights_tensor, int input_to_output_weights_tensor, int recurrent_to_input_weights_ten...
vuln
Safe
C/C++
package the.bytecode.club.bytecodeviewer.util; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.Objects; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.u...
vuln
Safe
Java
function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(x.style.border="1px solid black", x.style.backgroundColor=p):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="...
vuln
Safe
JavaScript
public AuthenticatedDB getDataStoreForToken(String token, Map<String, String> headers) throws UnauthorizedException { AuthenticationSubject authenticationSubject = authenticationService.validateToken(token, headers); DataStore dataStore = dataStoreFactory.create( authentication...
vuln
Safe
Java
static int wolfSSH_SFTP_DoStatus(WOLFSSH* ssh, word32 reqId, WS_SFTP_BUFFER* buffer) { word32 sz; word32 status = WOLFSSH_FTP_FAILURE; word32 localIdx = wolfSSH_SFTP_buffer_idx(buffer); word32 maxIdx = wolfSSH_SFTP_buffer_size(buffer); byte* buf = wolfSSH_SFTP_buffer_data(buffer); (void...
vuln
Vulnerable
C/C++
public static void addEditorKeys(DataContext context, Project project, File file, int cursor) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); if (project != null && preferences.getBoolean(SharedPreferenceKeys.JAVA_ERROR_HIGHLIGHTING, true)) { Module ...
vuln
Vulnerable
Java
package com.nexblocks.authguard.basic; import com.nexblocks.authguard.basic.passwords.SecurePassword; import com.nexblocks.authguard.basic.passwords.SecurePasswordProvider; import com.nexblocks.authguard.service.AccountsService; import com.nexblocks.authguard.service.CredentialsService; import com.nexblocks.authguard....
vuln
Vulnerable
Java
static bool set_reg_profile(RAnal *anal) { const char *p = "=PC pc\n" "=SP r14\n" // XXX "=BP srp\n" // XXX "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "gpr sp .32 56 0\n" // r14 "gpr acr .32 60 0\n" // r15 "gpr pc .32 64 0\n" // r16 // out of context "gpr srp .32 68 0\n" // like rbp on x86 // ou...
vuln
Vulnerable
Unknown
# -*- 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
int qcrypto_init(Error **errp) { #ifdef QCRYPTO_INIT_GCRYPT_THREADS gcry_control(GCRYCTL_SET_THREAD_CBS, &qcrypto_gcrypt_thread_impl); #endif #ifdef CONFIG_GNUTLS int ret; ret = gnutls_global_init(); if (ret < 0) { error_setg(errp, "Unable to initialize GNUTLS library: %s", ...
vuln
Safe
C/C++
public String[] getCdDtlNm() { return cdDtlNm; }
vuln
Vulnerable
Java
private ProposedImplementations prepareQueryList( AlgRoot logicalRoot, AlgDataType parameterRowType, boolean isRouted, boolean isSubQuery ) { boolean isAnalyze = statement.getTransaction().isAnalyze() && !isSubQuery; boolean lock = !isSubQuery; SchemaType schemaType = null; final Conven...
vuln
Safe
Java
static struct port_buffer *get_inbuf(struct port *port) { struct port_buffer *buf; unsigned int len; if (port->inbuf) return port->inbuf; buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = len; buf->offset = 0; port->stats.bytes_received += len; } return buf; }
vuln
Vulnerable
C/C++
def exec_command(self, cmd, in_data=None, sudoable=True): super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable) if cmd == "-" and not in_data.startswith(b"#!"): # The powershell plugin sets cmd to '-' when we are executing...
vuln
Safe
Python
static int parse_uint64(DeviceState *dev, Property *prop, const char *str) { uint64_t *ptr = qdev_get_prop_ptr(dev, prop); char *end; *ptr = strtoull(str, &end, 0); if ((*end != '\0') || (end == str)) { return -EINVAL; } return 0; }
vuln
Vulnerable
C/C++
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2020 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software...
vuln
Vulnerable
Python
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 (!device_is_registered(&dev...
vuln
Vulnerable
Unknown
public static File writeAssetsToFile(Context context, String assetPath) throws IOException { String fileName = assetPath.substring(assetPath.lastIndexOf("/") + 1); File resultFile = checkCacheSize(context, assetPath); if (!resultFile.exists()) { resultFile.createNewFile(); } ...
vuln
Vulnerable
Java
TPMI_RSA_KEY_BITS_Unmarshal(TPMI_RSA_KEY_BITS *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; TPMI_RSA_KEY_BITS orig_target = *target; // libtpms added if (rc == TPM_RC_SUCCESS) { rc = TPM_KEY_BITS_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { switch (*target...
vuln
Safe
Unknown
def _copy_volume(self, src_name, dest_name, cpg=None, snap_cpg=None, tpvv=True): # Virtual volume sets are not supported with the -online option cmd = ['createvvcopy', '-p', src_name, '-online'] if snap_cpg: cmd.extend(['-snp_cpg', snap_cpg]) if tpvv: ...
vuln
Safe
Python
static struct pending_op *acquire_write(struct external_chrc *chrc, struct btd_device *device, struct gatt_db_attribute *attrib, unsigned int id, const uint8_t *value, size_t len, uint8_t link_type) { struct pending_op *op; bool acquiring = !queue_isempty(chrc->pending_writes); op = pending...
vuln
Vulnerable
Unknown
import { FlowRouter } from 'meteor/ostrio:flow-router-extra' import dayjs from 'dayjs' import utc from 'dayjs/plugin/utc' import customParseFormat from 'dayjs/plugin/customParseFormat' import randomColor from 'randomcolor' import { t } from '../../utils/i18n.js' import { emojify, getUserSetting, getGlobalSetting,...
vuln
Safe
JavaScript
public static String getRelativeFileName(File fileToAdd, ZipParameters zipParameters) throws ZipException { String fileName; try { String fileCanonicalPath = fileToAdd.getCanonicalPath(); if (isStringNotNullAndNotEmpty(zipParameters.getDefaultFolderPath())) { File rootFolderFile = new File(...
vuln
Safe
Java
xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in, int len) { int ret = -2; int written; int toconv; if (handler == NULL) return(-1); if (out == NULL) return(-1); if (in == NULL) return(-1); /* calculate space available */ ...
vuln
Safe
Unknown
static void tulip_desc_read(TULIPState *s, hwaddr p, struct tulip_descriptor *desc) { const MemTxAttrs attrs = { .memory = true }; if (s->csr[0] & CSR0_DBO) { ldl_be_pci_dma(&s->dev, p, &desc->status, attrs); ldl_be_pci_dma(&s->dev, p + 4, &desc->control, attrs); ldl_be_pci_dma(...
vuln
Safe
Unknown
int qed_check(BDRVQEDState *s, BdrvCheckResult *result, bool fix) { QEDCheck check = { .s = s, .result = result, .nclusters = qed_bytes_to_clusters(s, s->file_size), .request = { .l2_table = NULL }, .fix = fix, }; int ret; check.used_clusters = g_try_malloc0(((che...
vuln
Vulnerable
C/C++
static Var* Pe_r_bin_pe_parse_var(RBinPEObj* pe, PE_DWord* curAddr) { Var* var = calloc (1, sizeof (*var)); if (!var) { pe_printf ("Warning: calloc (Var)\n"); return NULL; } if ((var->wLength = r_buf_read_le16_at (pe->b, *curAddr)) == UT16_MAX) { pe_printf ("Warning: read (Var wLength)\n"); free_Var (var); ...
vuln
Vulnerable
C/C++
function PMA_getErrorReportForm() { $html = ""; $html .= '<form action="error_report.php" method="post" name="report_frm"' . ' id="report_frm" class="ajax">' . '<fieldset style="padding-top:0px">'; $html .= '<p>' . __( 'phpMyAdmin has encountered an error. We have collected ...
vuln
Vulnerable
PHP
#!/usr/bin/env python # # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from typing import Optional, Tuple from onefuzztypes.events import EventInstanceConfigUpdated from onefuzztypes.models import InstanceConfig as BASE_CONFIG from pydantic import Field from .azure.creds import get_instance...
vuln
Vulnerable
Python
void qed_commit_l2_cache_entry(L2TableCache *l2_cache, CachedL2Table *l2_table) { CachedL2Table *entry; entry = qed_find_l2_cache_entry(l2_cache, l2_table->offset); if (entry) { qed_unref_l2_cache_entry(entry); qed_unref_l2_cache_entry(l2_table); return; } if (l2_cache->...
vuln
Safe
C/C++
private Entity getUniversallyDangerousMob(AltoClef mod) { // Wither skeletons are dangerous because of the wither effect. Oof kinda obvious. // If we merely force field them, we will run into them and get the wither effect which will kill us. if (mod.getEntityTracker().entityFound(WitherSkeleton...
vuln
Vulnerable
Java
bool virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req) { VirtIOSCSICommon *vs = &s->parent_obj; SCSIDevice *d; int rc; rc = virtio_scsi_parse_req(req, sizeof(VirtIOSCSICmdReq) + vs->cdb_size, sizeof(VirtIOSCSICmdResp) + vs->sense_size); if (rc < 0) ...
vuln
Vulnerable
C/C++
static void print_header(void) { if (!cgi_waspost()) { printf("Expires: 0\r\n"); } printf("Content-type: text/html\r\n"); printf("X-Frame-Options: DENY\r\n\r\n"); if (!include_html("include/header.html")) { printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n"); printf("<HTML>\n<HEAD>\n<TITLE>Samba...
vuln
Safe
Unknown
public byte[] toByteArray() throws TransformerConfigurationException, TransformerException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); TransformerFactory tranFactory = TransformerFactory.newInstance(); Transformer aTransformer = tranFactory.newTransformer(); Source src = n...
vuln
Vulnerable
Java
static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); ISACirrusVGAState *d = ISA_CIRRUS_VGA(dev); VGACommonState *s = &d->cirrus_vga.vga; if (s->vram_size_mb != 4 && s->vram_size_mb != 8 && s->vram_size_mb != 16) { error_setg(err...
vuln
Safe
C/C++
/* * This file is part of WinSparkle (https://winsparkle.org) * * Copyright (C) 2012-2016 Vaclav Slavik * * 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, incl...
vuln
Safe
C/C++
sctp_disposition_t sctp_sf_do_asconf_ack(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 *asconf_ack = arg; struct sctp_chunk *last_asconf = asoc->addip_last_asconf; struct sctp_chunk *abort; s...
vuln
Safe
Unknown
private void reset() { s = -1; for (int i = 0; i < maskEntities.length; i++) { MaskEntity m = maskEntities[i]; int index = i + 1; if (m == null) { abilityPanes[i].setViewportView(null); abilityPanes[i].setEnabled(false); ...
vuln
Vulnerable
Java
static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) { struct net *net = sock_net(skb->sk); rtnl_doit_func doit; int sz_idx, kind; int family; int type; int err; type = nlh->nlmsg_type; if (type > RTM_MAX) return -EOPNOTSUPP; type -= RTM_BASE; /* All the messages must have at least 1 b...
vuln
Safe
Unknown
import datetime import hashlib import itertools import logging import os import time from collections import defaultdict from dataclasses import dataclass from operator import itemgetter from typing import ( AbstractSet, Any, Callable, Collection, Dict, Iterable, List, Mapping, Optio...
vuln
Vulnerable
Python
public static int icon(int id) { if (id == 36) { return 2131165726; } for (int i = 0; i < cachedCustomComponents.size(); i++) { HashMap<String, Object> component = cachedCustomComponents.get(i); Object idObject = component.get("id"); if (idObject...
vuln
Vulnerable
Java
USHORT CNB::QueryL4HeaderOffset(PVOID PacketData, ULONG IpHeaderOffset) const { USHORT Res; auto ppr = ParaNdis_ReviewIPPacket(RtlOffsetToPointer(PacketData, IpHeaderOffset), GetDataLength(), __FUNCTION__); if (ppr.ipStatus != ppresNotIP) { Res = static_cas...
vuln
Vulnerable
C/C++
public void gadgetCall(String callName, Object payloadObject) { Logger.printGadgetCallIntro("DGC"); try { dgcCall(callName, packArgsByName(callName, payloadObject), false); } catch( Exception e ) { ExceptionHandler.handleGadgetCallException(e, RMIComponent.DGC, call...
vuln
Safe
Java
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq *pic) { DeviceState *dev; PCIBus *b; PCIDevice *d; I440FXState *s; PIIX3State *piix3; dev = qdev_create(NULL, "i440FX-pcihost"); s = FROM_SYSBUS(I440FXState, sysbus_from_qdev(dev)); b = pci_bus_new(&s->busdev....
vuln
Vulnerable
C/C++
static void mxf_write_system_item(AVFormatContext *s) { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; unsigned frame; uint32_t time_code; frame = mxf->last_indexed_edit_unit + mxf->edit_units_count; avio_write(pb, system_metadata_pack_key, 16); klv_encode_ber4_length(pb, 57);...
vuln
Safe
C/C++
int __mdiobus_register(struct mii_bus *bus, struct module *owner) { struct mdio_device *mdiodev; int i, err; struct gpio_desc *gpiod; if (NULL == bus || NULL == bus->name || NULL == bus->read || NULL == bus->write) return -EINVAL; BUG_ON(bus->state != MDIOBUS_ALLOCATED && bus->state != MDIOBUS_UNR...
vuln
Safe
C/C++
function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.locat...
vuln
Vulnerable
JavaScript
el: $("#patientModelContainer") }); // tell the model view where it's template is located this.modelView.templateEl = $("#patientModelTemplate"); this.modelView.on('rendered', function () { // model rendered $(function () { $('.jquery-date-picker').datetimep...
vuln
Safe
JavaScript
def lists if request.post? if params[:language_action] == "remove" lu = Tr8n::LanguageUser.find(:first, :conditions => ["language_id = ? and user_id = ?", params[:language_id].to_i, tr8n_current_user.id]) lu.destroy end end @all_languages = Tr8n::Language.enab...
vuln
Safe
Ruby
const bootbox = require('bootbox'); require('../services/Requisitions'); require('../services/Synchronize'); /** * @author Alejandro Galue <agalue@opennms.org> * @copyright 2014 The OpenNMS Group, Inc. */ (function() { 'use strict'; const quickAddNodeView = require('../../views/quick-add-node.html'); const c...
vuln
Safe
Java
pci_get_cfgdata16(struct pci_vdev *dev, int offset) { assert(offset <= (PCI_REGMAX - 1) && (offset & 1) == 0); return (*(uint16_t *)(dev->cfgdata + offset)); }
vuln
Vulnerable
C/C++
@SuppressWarnings("unchecked") public void authorized(Subject var) throws SurenessAuthorizationException { List<String> ownRoles = (List<String>)var.getOwnRoles(); List<String> supportRoles = (List<String>)var.getSupportRoles(); if (supportRoles != null && !supportRoles.isEmpty() && ownRoles...
vuln
Vulnerable
Java
cJSON *cJSON_CreateArray( void )
vuln
Safe
C/C++
GF_Err gf_xml_parse_bit_sequence_bs(GF_XMLNode *bsroot, const char *parent_url, GF_BitStream *bs_orig) { u32 i, j; GF_Err e = GF_OK; GF_XMLNode *node; GF_XMLAttribute *att; GF_BitStream *bs = bs_orig; u32 enc_base64 = 0; i=0; while ((node = (GF_XMLNode *) gf_list_enum(bsroot->content, &i))) { u32 nb_bits = 0...
vuln
Vulnerable
C/C++
public static void authorizeModifyOp(ConditionalOperation task, Callback<ConditionalOperation> callback) throws Exception { final XyzHubActionMatrix tokenRights = task.getJwt().getXyzHubMatrix(); final XyzHubActionMatrix requestRights = new XyzHubActionMatrix(); final Entry<Space> entry = task.modifyOp.ent...
vuln
Vulnerable
Java
static int seticcspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; ref ICCdict, *tempref, *altref=NULL, *nocie = NULL; int components, code; float range[8]; code = dict_find_string(systemdict, "NOCIE", &nocie); if (code > 0) { if (!r_has_type(n...
vuln
Safe
Unknown
address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr orig_addr, hwaddr *xlat, hwaddr *plen, MemTxAttrs attrs, int *prot) { MemoryRegionSection *section; IOMMUMemoryRegion *iommu_mr; IOMMUMemoryRegionClass *imrc; IOMMUTLBEn...
vuln
Safe
C/C++
static int image_probe(AVProbeData *p) { if (av_str2id(img_tags, p->filename)) { if (av_filename_number_test(p->filename)) return AVPROBE_SCORE_MAX; else return AVPROBE_SCORE_MAX/2; } return 0; }
vuln
Vulnerable
C/C++
int fpm_log_write(char *log_format) /* {{{ */ { char *s, *b; char buffer[FPM_LOG_BUFFER+1]; int token, test; size_t len, len2; struct fpm_scoreboard_proc_s proc, *proc_p; struct fpm_scoreboard_s *scoreboard; char tmp[129]; char format[129]; time_t now_epoch; #ifdef HAVE_TIMES clock_t tms_total; #endif if (!...
vuln
Vulnerable
C/C++
@Nullable @Override public IBakedModel getOverrideModel(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) { CompoundNBT baseTag = NBTHelper.getTag(stack); IBakedModel result = originalModel; if(!baseTag.isEmpty()) { Cache...
vuln
Vulnerable
Java
translate_hierarchy_event (ClutterBackendX11 *backend_x11, ClutterDeviceManagerXI2 *manager_xi2, XIHierarchyEvent *ev) { int i; for (i = 0; i < ev->num_info; i++) { if (ev->info[i].flags & XIDeviceEnabled) { XIDeviceInfo...
vuln
Safe
Unknown
def group Log.add_info(request, params.inspect) date_s = params[:date] if date_s.blank? @date = Date.today else @date = Date.parse(date_s) end @group_id = params[:id] SqlHelper.validate_token([@group_id, params[:id]]) group_users = Group.get_users(params[:id]) @user_sc...
vuln
Safe
Ruby
static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_from, const char *url_to, int options, php_stream_context *context) { int ret; if (!url_from || !url_to) { return 0; } #ifdef PHP_WIN32 if (!php_win32_check_trailing_space(url_from, (int)strlen(url_from))) { php_win32_docref2_from_...
vuln
Safe
C/C++
SPL_METHOD(SplObjectStorage, unserialize) { spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); char *buf; int buf_len; const unsigned char *p, *s; php_unserialize_data_t var_hash; zval *pentry, *pmembers, *pcount = NULL, *pinf; long count; if (zend_parse_p...
vuln
Vulnerable
Unknown
const addReplyToEvent = (event: any) => { event.reply = (...args: any[]) => { event.sender.sendToFrame(event.frameId, ...args); }; };
vuln
Vulnerable
C/C++
/* RawSpeed - RAW file decoder. Copyright (C) 2009-2014 Klaus Post Copyright (C) 2017 Roman Lebedev This library 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 ...
vuln
Safe
C/C++
/* * Copyright (c) 2017, Salvatore Sanfilippo <antirez at gmail dot com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyrig...
vuln
Safe
C/C++
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2000-2019 * All rights reserved * * This file is part of GPAC / ISO Media File Format sub-project * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU L...
vuln
Safe
C/C++
ipmi_get_channel_cipher_suites(struct ipmi_intf *intf, const char *payload_type, uint8_t channel, struct cipher_suite_info *suites, size_t *count) { struct ipmi_rs *rsp; struct ipmi_rq req; ui...
vuln
Safe
C/C++
function details($selected_events, $queue) { global $array_ged_queues; global $database_ged; if(!in_array($queue,$array_ged_queues)) { $queue=$array_ged_queues[0]; } // get all needed infos into variables $value_parts = explode(":", $selected_events); $id = $value_parts[0]; $ged_type = $value_parts[1]; $sql...
vuln
Safe
PHP
mxEvent.consume(ua))},Za=U.actions.get("zoomIn"),cb=U.actions.get("zoomOut"),Ja=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo...
vuln
Safe
JavaScript
int coroutine_fn bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { int64_t ret = bdrv_get_block_status(bs, sector_num, nb_sectors, pnum); if (ret < 0) { return ret; } return (ret & BDRV_BLOCK_ALLOCATED); }
vuln
Vulnerable
C/C++
/*- * Copyright (c) 2004-2013 Tim Kientzle * Copyright (c) 2011-2012,2014 Michihiro NAKAJIMA * Copyright (c) 2013 Konrad Kleine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redi...
vuln
Safe
C/C++
CodingReturnValue VP8ComponentDecoder::decode_chunk(UncompressedComponents * const colldata) { mux_splicer.init(spin_workers_); /* cmpc is a global variable with the component count */ /* construct 4x4 VP8 blocks to hold 8x8 JPEG blocks */ if ( thread_state_[0] == nullptr || thread_state_[0]->context_...
vuln
Vulnerable
C/C++
/* eslint-disable */ /*! markdown-it-footnote 3.0.3 https://github.com//markdown-it/markdown-it-footnote @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=wi...
vuln
Safe
JavaScript
int ff_MPV_common_frame_size_change(MpegEncContext *s) { int i, err = 0; if (s->slice_context_count > 1) { for (i = 0; i < s->slice_context_count; i++) { free_duplicate_context(s->thread_context[i]); } for (i = 1; i < s->slice_context_count; i++) { av_freep(&s->th...
vuln
Safe
C/C++
/* Copyright 2018 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
MagickExport void CatchException(ExceptionInfo *exception) { register const ExceptionInfo *p; assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); if (exception->exceptions == (void *) NULL) return; LockSemaphoreInfo(exception->semaphore); ResetLinkedListIt...
vuln
Vulnerable
C/C++
public void createDeleteHistoryAlert(BaseFragment fragment, TLRPC.Chat chat, long mergeDialogId, Theme.ResourcesProvider resourcesProvider) { if (fragment == null || fragment.getParentActivity() == null || chat == null) { return; } Context context = fragment.getParentActivity(); ...
vuln
Safe
Java
public void handle(HttpExchange pExchange) throws IOException { if (requestHandler == null) { throw new IllegalStateException("Handler not yet started"); } JSONAware json = null; URI uri = pExchange.getRequestURI(); ParsedUri parsedUri = new ParsedUri(uri,context); ...
vuln
Safe
Java
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */ /* * lsquic_di_hash.c -- Copy incoming data into a hash * * While this implementation copies the data, its memory use is limited, * which makes it a good choice when we have a lot of stream frames * coming in. * * Another difference is tha...
vuln
Vulnerable
C/C++
static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offset) { AVPacket pkt1, *pkt = &pkt1; AVStream *st; int read_size, i, ret; int64_t end_time; int64_t filesize, offset, duration; if (ic->cur_st && ic->cur_st->parser) av_free_packet(&ic->cur_pkt); ic->cu...
vuln
Vulnerable
C/C++
public static void ourUnitDestroyed(AUnit unit) { ourLostTypes.incrementValueFor(unit.type()); if (!unit.isBuilding()) { ourKillLossResourcesPerUnitTypes.changeValueBy(unit.type(), -unit.totalCost()); } }
vuln
Vulnerable
Java
getScanlineChunkOffsetTableSize(const Header& header) { const Box2i &dataWindow = header.dataWindow(); vector<size_t> bytesPerLine; size_t maxBytesPerLine = bytesPerLineTable (header, bytesPerLine); Compressor* compressor = newCompressor(header.compressi...
vuln
Vulnerable
Unknown
CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) { /* When sending a SMTP payload we must detect CRLF. sequences making sure they are sent as CRLF.. instead, as a . on the beginning of a line will be deleted by the server when not part of an EOB terminator and a genuine CRLF...
vuln
Vulnerable
C/C++
void DoNonMaxSuppressionOp(OpKernelContext* context, const Tensor& scores, int num_boxes, const Tensor& max_output_size, const T similarity_threshold, const T score_threshold, const T soft_nms_sigma, const std::f...
vuln
Safe
Unknown
I.getColor(),z.checked,L.checked,C.checked,D.checked,G.checked,null!=P?P.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");m...
vuln
Vulnerable
JavaScript