text
stringlengths
79
3.72M
<vulnerable_code> unsigned char *fp; /* flags pointer. */ size_t usable; sh = trymalloc? s_trymalloc_usable(hdrlen+initlen+1, &usable) : s_malloc_usable(hdrlen+initlen+1, &usable); len = sdslen(s); sh = (char*)s-sdsHdrSize(oldtype); newlen = (len+addlen); if (newlen < SDS_MAX...
<vulnerable_code>#endif #endif /* Explicitly override malloc/free etc when using tcmalloc. */ #if defined(USE_TCMALLOC) #define malloc(size) tc_malloc(size) /* Try allocating memory, and return NULL if failed. * '*usable' is set to the usable size if non NULL. */ void *ztrymalloc_usable(size_t size, size_t *usable) {...
<vulnerable_code> * values to the corresponding value type. This is basically the opposite of the {@link #ACCEPT_SINGLE_VALUE_AS_ARRAY} * feature. If more than one value is found in the array, a JsonMappingException is thrown. * <p> * * Feature is disabled by default * @since 2.4 */...
<vulnerable_code>import com.fasterxml.jackson.databind.cfg.CoercionAction; import com.fasterxml.jackson.databind.deser.impl.*; import com.fasterxml.jackson.databind.deser.impl.ReadableObjectId.Referring; import com.fasterxml.jackson.databind.util.IgnorePropertiesUtil; import com.fasterxml.jackson.databind.util.NameTran...
<vulnerable_code>package com.fasterxml.jackson.databind.deser.dos; import com.fasterxml.jackson.databind.*; public class DeepArrayWrappingForDeser3582Test extends BaseMapTest { // 23-Aug-2022, tatu: Before fix, fails with 5000 // (but passes with 2000) // private final static int TOO_DEEP_NESTING = 4999...
<vulnerable_code> isReq = transportDirection_ == TransportDirection::DOWNSTREAM; } decodeInfo_.init(isReq, parsingDownstreamTrailers_); if (priority) { if (curHeader_.stream == priority->streamDependency) { streamError(folly::to<string>("Circular dependency for txn=", ...
<vulnerable_code> EXPECT_EQ(callbacks_.sessionErrors, 0); } TEST_F(HTTP2CodecTest, BadPriority) { auto pri = HTTPMessage::HTTPPriority(0, true, 1); upstreamCodec_.generatePriority(output_, 1, pri);<commit_title>[PATCH] Fix h2 codec state after bad priority header.<commit_description>Summary: It's possible for the...
<vulnerable_code> "/GB-EUC-H": "gbk", # TBC "/GB-EUC-V": "gbk", # TBC "/GBpc-EUC-H": "gb2312", # TBC "/$WinREAgentGBpc-EUC-V": "gb2312", # TBC } # manually extracted from http://mirrors.ctan.org/fonts/adobe/afm/Adobe-Core35_AFMs-229.tar.gz<commit_title>[PATCH] paste error<commit_description><fixed_c...
<vulnerable_code> */ public final class DOMUtils { private static final Logger LOG = LoggerFactory.getLogger(DOMUtils.class); private static final String XMLNAMESPACE = "xmlns"; private static final DocumentBuilderFactory DBF = DocumentBuilderFactory.newInstance(); static { try { ...
<vulnerable_code> webClient.close(); } // Send an malformed wreq value @org.junit.Test public void testMalformedWReq() throws Exception {<commit_title>[PATCH] Make sure DocTypes are disallowed<commit_description><fixed_code> webClient.close(); } // Send an entity expansion attac...
<vulnerable_code> process.nextTick(() => { let urlSanitized = ''; const s = util.sanitizeShellString(url); for (i = 0; i <= 2000; i++) { if (!(s[i] === undefined || s[i] === ' ' || s[i] === '{' || s[i] === '}')) { const sl = s[i].toLowerCase(); ...
<vulnerable_code> // skip header line // use the second line because it is tied to the NIC instead of the ipv4 or ipv6 address stats = lines[1].replace(/ +/g, ' ').split(' '); rx_bytes = parseInt(stats[6]); rx_dropped = parseInt(st...
<vulnerable_code>function sanitizeShellString(str) { const s = str || ''; let result = ''; for (i = 0; i <= 2000; i++) { if (!(s[i] === undefined || s[i] === '>' || s[i] === '<' || } function isPrototypePolluted() { s = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' let notP...
<vulnerable_code> bprintf ("mach0-get-symbols: error\n"); break; } if (parse_import_stub(bin, &symbols[j], i)) symbols[j++].last = 0; } #if 1 for (i = 0; i < bin->nsects; i++) { if ((bin->sects[i].flags & SECTION_TYPE) == stype) { for (j=0, sym=-1; bin->sects[i].reserved1+j < bin->nindirectsyms; j+...
<vulnerable_code> DHCP6Address *addr; int r; assert_return(buf && *buf && buflen && ia, -EINVAL); switch (ia->type) { case SD_DHCP6_OPTION_IA_NA:<commit_title>[PATCH] dhcp6: split assert_return() to be more debuggable when hit<commit_description><fixed_code> DHCP6Address...
<vulnerable_code> // by setting a custom error handler. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); db.setErrorHandler(new ErrorHandler()); db.parse(n...
<vulnerable_code> tzset(); } int main(int argc, char **argv, char **envp) { int opt; tmate_catch_sigsegv(); tmate_init_rand(); if ((mkdir(TMATE_WORKDIR, 0701) < 0 && errno != EEXIST) || (mkdir(TMATE_WORKDIR "/sessions", 0703) < 0 && errno != EEXIST) || (mkdir(TMATE_WORKDIR "/jail", 0700) ...
<vulnerable_code>import weakref from sentry_sdk._types import MYPY from sentry_sdk.consts import OP from sentry_sdk.hub import Hub, _should_send_default_pii from sentry_sdk.scope import add_global_event_processor from sentry_sdk.serializer import add_global_repr_processor clean_cookies = {} # type: Dict[str, ...
<vulnerable_code> */ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) { ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; shm_rmid(ns, shp); shm_unlock(shp); if (!is_file_hugepages(shp->shm_file)) shmem_lock(shp->shm_file, 0, shp->mlock_user); else if (shp->mlock_user) u...
<vulnerable_code> obuf->table_level = MAX_TABLE - 1; while (obuf->table_level >= 0) { table_mode[obuf->table_level].pre_mode &= ~(TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN); HTMLlineproc1("</table>", h_env); } } <commit_title>[PATCH] Prevent memory exhausted due to repeat appending "</table>"<commit_descrip...
<vulnerable_code> function copy(src,dest){ for(var p in src){ dest[p] = src[p]; } } //console.dir(map) if(map){ for(var n in map){ if(map[n] == namespaceURI){ return n; } } } el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; va...
<vulnerable_code> if(endIgnoreCaseMach){ domBuilder.endElement(config.uri,config.localName,tagName); if(localNSMap){ for(var prefix in localNSMap){ domBuilder.endPrefixMapping(prefix) ; } } if(!endMatch){ if(el.closed){ domBuilder.endElement(ns,localName,tagName)...
<vulnerable_code> s->sgnd[i] = !!(x & 0x80); s->cdx[i] = bytestream2_get_byteu(&s->g); s->cdy[i] = bytestream2_get_byteu(&s->g); if (!s->cdx[i] || !s->cdy[i]) { av_log(s->avctx, AV_LOG_ERROR, "Invalid sample seperation\n"); return AVERROR_INVALIDDATA; ...
<vulnerable_code> # test with organization permissions from other organization org = Organization() col = Collaboration(organizations=[org]) task = Task(collaboration=col) # NB: node is used implicitly in task/{id}/result schema node = Node(organization=org, collaboration...
<vulnerable_code>def permissions(permissions: PermissionManager): add = permissions.appender(module_name) add(scope=S.GLOBAL, operation=P.VIEW, description="view any run") add(scope=S.COLLABORATION, operation=P.VIEW, assign_to_container=True, assign_to_node=True, description="view runs of y...
<vulnerable_code> } sha256size = strlen( metadata_any_boards.objects[1].objects.sha256sum) + 1; if (sha256size != SHA256_HEX_DIGEST_SIZE) { LOG_ERR("SHA256 size is invalid");<commit_title>[PATCH] lib: updatehub: Fix bus fault<commit_description>Fix variable-size string copy patch that introduced a runtime ...
<vulnerable_code><commit_title>[PATCH] Math: Rewrite calc functions with a proper evaluator.<commit_description>Instead of hacking around eval(), which everyone knows is a bad idea even with prior expression sanitizing.<fixed_code> ### # Copyright (c) 2019, Valentin Lorentz # All rights reserved. # # Redistribution and...
<vulnerable_code>_ = PluginInternationalization('Math') from .local import convertcore baseArg = ('int', 'base', lambda i: i <= 36) return str(number) return self._convertDecimalToBase(number, toBase) _mathEnv = {'__builtins__': types.ModuleType('__builtins__'), 'i': 1j} _mathEnv.update(...
<vulnerable_code> self.assertError('base 4 4') self.assertError('base 10 12 A') print() print("If we have not fixed a bug with Math.base, the following ") print("tests will hang the test-suite.") self.assertRegexp('base 2 10 [base 10 2 -12]', '-12') self.assertReg...
<vulnerable_code> this._localMediaActive = false this.localStreams = [] this.localScreens = [] if (!webrtcIndex.mediaDevicesManager.isSupported()) { this._trackToStream.addInputTrackSlot('audio') this._trackToStream.addInputTrackSlot('video') this._handleStreamSetBound = this._handleStreamSet.bind(this) this....
<vulnerable_code> if (sender.track) { // The stream is not known, but it is only used when the // track is added, so it can be ignored here. self.handleLocalTrackEnabledChanged(sender.track, null) } }) this.broadcaster = options.broadcaster } } else { this.parent.localStreams...
<vulnerable_code> ThrowReaderException(CorruptImageError,"ImproperImageHeader"); ept_info.postscript_offset=(MagickOffsetType) ReadBlobLSBLong(image); ept_info.postscript_length=ReadBlobLSBLong(image); (void) ReadBlobLSBLong(image); (void) ReadBlobLSBLong(image); ept_info.tiff_offset=(MagickOffsetType) Rea...
<vulnerable_code><commit_title>[PATCH] Use script to copy .d.ts files to .d.cts (#1143)<commit_description>The command `cp` isn't (always) available on Windows. Creating the script is simple enough, and it reduces friction for contributors on Windows, so I think it's worth it.<fixed_code> /** * @overview Create the `....
<vulnerable_code> if (context != null) { String name = (String)environment.get("jndiName"); if (name == null) { name = "axisServiceName"; } context.bind(name, service); } catch (NamingException e1) { ...
<vulnerable_code><commit_title>[PATCH] fix(permissions): lock stdio streams when prompt is shown<commit_description><fixed_code> console.clear(); console.log("Are you sure you want to continu?");
<vulnerable_code>const file = Deno.openSync("./clearscreen.txt"); file.readable.pipeTo(Deno.stdout.writable); // console.clear(); console.log("Are you sure you want to continu?");<commit_title>[PATCH] fix(permissions): lock stdio streams when prompt is shown<commit_description><fixed_code>
<vulnerable_code> " Enter WriteOnePNGImage()"); image = CloneImage(IMimage,0,0,MagickFalse,exception); image_info=(ImageInfo *) CloneImageInfo(IMimage_info); if (image_info == (ImageInfo *) NULL) ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed"); /* Define these outside of the follow...
<vulnerable_code> u32 val = 0; u32 count = 0; struct device *dev; struct i2s_platform_data *i2s_pdata; struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell), GFP_KERNEL); if (adev->acp.acp_cell == NULL) return -ENOMEM; adev->acp.a...
<vulnerable_code> ddm.select = function(opt_data, opt_ignored) { var output = '<div class="form-group' + soy.$$escapeHtmlAttribute(opt_data.visible ? '' : ' hide') + '" data-fieldname="' + soy.$$escapeHtmlAttribute(opt_data.name) + '"><div class="input-select-wrapper">' + ((opt_data.showLabel) ? ddm.select_label(opt...
<vulnerable_code><commit_title>[PATCH] Added goblal optimisation passes based on data flow analyses<commit_description><fixed_code> /* +----------------------------------------------------------------------+ | Zend Engine, Removing unused variables | +-----------------------------...
<vulnerable_code><commit_title>[PATCH] Added goblal optimisation passes based on data flow analyses<commit_description><fixed_code> /* +----------------------------------------------------------------------+ | Zend Engine, DCE - Dead Code Elimination | +-----------------------------...
<vulnerable_code>#include "zend_inference.h" #include "zend_dump.h" int zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, uint32_t *flags) { uint32_t build_flags; } if (ctx->debug_level & ZEND_DUMP_DFA_SSA) { zend_dump_op_array(op_array, ZEND_DUMP_SSA, "before dfa pass", ...
<vulnerable_code><commit_title>[PATCH] Added goblal optimisation passes based on data flow analyses<commit_description><fixed_code> /* +----------------------------------------------------------------------+ | Zend Engine, SCCP - Sparse Conditional Constant Propagation | +-----------------------------...
<vulnerable_code><commit_title>[PATCH] Added goblal optimisation passes based on data flow analyses<commit_description><fixed_code> /* +----------------------------------------------------------------------+ | Zend Engine, Sparse Conditional Data Flow Propagation Framework | +-----------------------------...
<vulnerable_code><commit_title>[PATCH] Added goblal optimisation passes based on data flow analyses<commit_description><fixed_code> /* +----------------------------------------------------------------------+ | Zend Engine, SSA validation | +-----------------------------...
<vulnerable_code> flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; } break; } } /* Build CFG, Step 4, Mark Reachable Basic Blocks */ zend_mark_reachable_blocks(op_array, cfg, 0); cfg->dynamic = (flags & ZEND_FUNC_INDIRECT_VAR_ACCESS); if (func_flags) { *func_flags |= flags; for (j = 0; j < cfg->blocks_c...
<vulnerable_code> } } else { for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { if (p->sources[j] >= 0 && ssa->vars[p->sources[j]].no_val) { ssa_vars[p->sources[j]].no_val = 0; /* used indirectly */ zend_bitset_incl(worklist, p->sources[j]); } } } else { for (i ...
<vulnerable_code> zend_hash_add(ctx->constants, Z_STR_P(name), &val); } int zend_optimizer_eval_binary_op(zval *result, zend_uchar opcode, zval *op1, zval *op2) /* {{{ */ { binary_op_type binary_op = get_binary_op(opcode); zend_op *opline, ...
<vulnerable_code> | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+...
<vulnerable_code>{ static snmp_header_t header; static snmp_varbind_t varbinds[SNMP_MAX_NR_VALUES]; static uint32_t varbind_length; buff = snmp_message_decode(buff, buff_len, &header, varbinds, &varbind_length); if(buff == NULL) {<commit_title>[PATCH] Implemented varbinds buffer limit check.<commit_descripti...
<vulnerable_code> } for(i = 0; buf_len > 0; ++i) { buf = snmp_ber_decode_type(buf, &buf_len, &type); if(buf == NULL) {<commit_title>[PATCH] Implemented varbinds buffer limit check.<commit_description>Implemented measures to verify if the number of requested variables does not overflow the buffer.<fixed_cod...
<vulnerable_code> NX_DEBUG(_debug_custom_score, NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "XX-custom check rules"); if (!ctx->ignore && (cf->ignore_ips || cf->ignore_cidrs)) { #if (NGX_HTTP_X_FORWARDED_FOR) #if (nginx_version < 1023000) ngx_table_elt_t** h; if (r->headers_in.x_forwarded_for.nelts >= 1) { ...
<vulnerable_code> os.unlink(filepath) <commit_title>[PATCH] [#3452] add igetwild filename test<commit_description><fixed_code> os.unlink(filepath) def test_igetwild_with_semicolon_in_filename(self): localfile = 'thelocalfile.txt' localpath = lib.create_local_testfile(loc...
<vulnerable_code> q+=GetPixelChannels(image); continue; } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { PixelChannel channel = GetPixelChannelChannel(image,i); PixelTrait traits = GetPixelChannelTraits(image,channel); ...
<vulnerable_code>bool falco_logger::log_stderr = true; bool falco_logger::log_syslog = true; void falco_logger::log(int priority, const string msg) { if(priority > falco_logger::level) { return; } if (falco_logger::log_syslog) { ::syslog(priority, "%s", msg.c_str()); } if (falco_logger::log_stderr) { st...
<vulnerable_code> import com.fastasyncworldedit.bukkit.util.WorldUnloadedException; import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.internal.exception.FaweException; import com.fastasyncworldedit.core.queue.IChunkGet; import com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket...
<vulnerable_code> "fawe.cancel.reason.outside.region"), Type.OUTSIDE_REGION ); public static final FaweException MAX_CHECKS = new FaweException( Caption.of("fawe.cancel.reason.max" + ".checks"), Type.MAX_CHECKS<commit_title>[PATCH] feat: prevent edits outsi...
<vulnerable_code> " - Any blacklist regions are likely to override any internal allowed regions." }) public boolean WORLDGUARD_REGION_BLACKLIST = false; } <commit_title>[PATCH] feat: prevent edits outside +/- 30,000,000 blocks<commit_description><fixed_code> " - Any b...
<vulnerable_code> MANUAL, NO_REGION, OUTSIDE_REGION, MAX_CHECKS, MAX_CHANGES, LOW_MEMORY,<commit_title>[PATCH] feat: prevent edits outside +/- 30,000,000 blocks<commit_description><fixed_code> MANUAL, NO_REGION, OUTSIDE_REGION, OUTSIDE_SAFE_...
<vulnerable_code> if (pair == lastPair) { return lastChunk; } if (!processGet(x, z)) { lastPair = pair; lastChunk = NullChunk.getInstance(); return NullChunk.getInstance();<commit_title>[PATCH] feat: prevent edits outside...
<vulnerable_code>import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.util.FaweTimer; import com.fastasyncworldedit.core.util.TaskManager; import com.fastasyncworldedit.core.util.collection.MutablePair; import com.google.common.collect.Im...
<vulnerable_code> return defaultConf; } void LogHandler::setupLogFile(el::Configurations *defaultConf, string filename, string maxlogsize) { // Enable strict log file size check el::Loggers::addFlag(el::LoggingFlag::StrictLogFileSizeCheck); defaultConf->setGlobally(el::Configuratio...
<vulnerable_code> el::Loggers::setVerboseLevel(result["verbose"].as<int>()); if (result.count("logtostdout")) { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "true"); } else { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false"); // Redirect std str...
<vulnerable_code> el::Loggers::setVerboseLevel(result["verbose"].as<int>()); if (result.count("logtostdout")) { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "true"); } else { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false"); } // default max...
<vulnerable_code> } } if (result.count("logtostdout")) { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "true"); } else { defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false"); // Redirect std streams to a file LogHandler::stderrToFile(GetT...
<vulnerable_code> if (db_args) { for (i=0; db_args[i]; ++i) { arg = strtok_r(db_args[i], "=", &arg_val); if (strcmp(arg, TKTPOLICY_ARG) == 0) { dptr = &xargs->tktpolicydn; } else {<commit_title>[PATCH] Fix LDAP null deref on empty arg [CVE-2016-3119]<commit...
<vulnerable_code>/* ** Copyright (C) 2010-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by /* Calculate new file offset and position ourselves there. */ psf->fileo...
<vulnerable_code> (void) LogMagickEvent(CoderEvent,GetMagickModule(), " layer blending ranges: length=%.20g",(double) ((MagickOffsetType) length)); /* We read it, but don't use it... */ for (j...
<vulnerable_code>package com.fasterxml.sort.std; import java.io.*; import com.fasterxml.sort.TempFileProvider; @Override public File provide() throws IOException { File f = File.createTempFile(_prefix, _suffix); f.deleteOnExit(); return f; }<commit_title>[PATCH] vuln-fix: Temp...
<vulnerable_code> num_filtered_settlements = filtered_centroids_keys.length; if (get_cluster_type() == "og"){ var filter_title = $("#n_ogclusters"); } else{ var filter_title = $("#n_clusters"); } var new_text = " " + num_filtered_settlements + " f...
<vulnerable_code>import os import posixpath import re from typing import Any, Dict from urllib.parse import urlparse def _get_source_type() -> str: return "http" def load(self, dst_path=None) -> str: """ Downloads the dataset source to the local filesystem. ) augmented_r...
<vulnerable_code>from mlflow.data.dataset_source_registry import get_dataset_source_from_json, resolve_dataset_source from mlflow.data.http_dataset_source import HTTPDatasetSource from mlflow.exceptions import MlflowException from mlflow.utils.rest_utils import cloud_storage_http_request with pytest.raises(M...
<vulnerable_code> if (args->bcl_start != args->bcl_end) { bin = kcalloc(1, sizeof(*bin), GFP_KERNEL); if (!bin) return -ENOMEM; ret = v3d_job_init(v3d, file_priv, &bin->base, v3d_job_free, args->in_sync_bcl); if (ret) { v3d_job_put(&render->base); return ret; } <commit_title>[PATCH] drm/v3d:...
<vulnerable_code> 0x55, 0x42, 0x4F, 0x00, 0x06, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x79, 0x65, 0x50, 0x6F, 0x73, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x50, 0x6F, 0x73, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,...
<vulnerable_code>#ifdef USE_VULKAN uint32_t pipeline; int fog_stage; vk_bind_index(); tess_flags = input->shader->tessFlags; #ifdef USE_FOG_COLLAPSE if ( fogCollapse ) { VK_SetFogParams( &uniform, &fog_stage ); VectorCopy( backEnd.or.viewOrigin, uniform.eyePos ); VK_PushUniform( &uniform ); vk_update_de...
<vulnerable_code> def.color.alpha = pStage->bundle[0].alphaGen == AGEN_IDENTITY ? 255 : tr.identityLightByte; } } } break; }<commit_title>[PATCH] Vulkan: added entity-color optimization for single-stage<commit_description><fixed_code> def.color.alpha = pStage->bundle[0].alphaGe...
<vulnerable_code> } } vk.modules.frag.gen[0][0][0] = SHADER_MODULE( frag_tx0 ); vk.modules.frag.gen[0][0][1] = SHADER_MODULE( frag_tx0_fog ); } } qvkDestroyShaderModule( vk.device, vk.modules.frag.gen0_df, NULL ); qvkDestroyShaderModule( vk.device, vk.modules.color_fs, NULL ); fs_module = &vk.modules.fr...
<vulnerable_code> 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B */ #define RAW(row,col) \ raw_image[(row)*raw_width+(col)] //@end DEFINES void CLASS nikon_coolscan_load_raw() { int bufsize = width*3*tiff_bps/8; if(tiff_bps <= 8) gamma_curve(1.0/imgdata.params.coolscan_nef_gamma,0.,1,255); else ...
<vulnerable_code>import java.util.function.Consumer; import java.util.stream.Collectors; import org.jetbrains.annotations.ApiStatus.Internal; /** * Main Dragonfly class. */ public class Dragonfly { private static final String VERSION = "0.3.0-SNAPSHOT"; private final int timeout; private final Path directory; ...
<vulnerable_code>import java.util.HashSet; import java.util.Set; import java.util.function.Consumer; import org.jetbrains.annotations.NotNull; /** * * @return New {@link Dragonfly} instance. */ public @NotNull Dragonfly build() { try { return new Dragonfly(timeout, classLoader, directory, repositories, del...
<vulnerable_code>@Downloader(MavenDependency.class) public class MavenDownloader implements IDownloader<MavenDependency> { private final MavenResolver resolver = new MavenResolver(); private final MavenSnapshotResolver snapshotResolver = new MavenSnapshotResolver(); @Override public void download(@NotNull Dragonf...
<vulnerable_code> package dev.hypera.dragonfly.exceptions; public class DownloadFailureException extends DragonflyException { public DownloadFailureException() { super(); } public DownloadFailureException(String message) { super(message); } public DownloadFailureException(String message, Throwable cause) {...
<vulnerable_code> package dev.hypera.dragonfly.exceptions; /** * Dragonfly Exception. * @author Joshua Sing <joshua@hypera.dev> */ public class DragonflyException extends Exception { public DragonflyException() { super(); } public DragonflyException(String message) { super(message); } public DragonflyEx...
<vulnerable_code> package dev.hypera.dragonfly.exceptions; public class LoadFailureException extends DragonflyException { public LoadFailureException() { super(); } public LoadFailureException(String message) { super(message); } public LoadFailureException(String message, Throwable cause) { super(message...
<vulnerable_code> package dev.hypera.dragonfly.exceptions; public class RelocationFailureException extends DragonflyException { public RelocationFailureException() { super(); } public RelocationFailureException(String message) { super(message); } public RelocationFailureException(String message, Throwable ...
<vulnerable_code> package dev.hypera.dragonfly.exceptions; public class ResolveFailureException extends DownloadFailureException { public ResolveFailureException() { super(); } public ResolveFailureException(String message) { super(message); } public ResolveFailureException(String message, Throwable cause)...
<vulnerable_code>import java.net.MalformedURLException; import java.util.List; import org.jetbrains.annotations.ApiStatus.Internal; /** * Dependency loader. */ public class DependencyLoader { private final Dragonfly dragonfly; private final IClassLoader classLoader; @Internal public DependencyLoader(Dragonfly ...
<vulnerable_code>import java.net.URL; import java.net.URLClassLoader; import org.jetbrains.annotations.ApiStatus.Internal; /** * Dragonfly class loader, a child-first {@link URLClassLoader} used for loading Dragonfly's internal dependencies. @Internal public class DragonflyClassLoader extends URLClassLoader { publi...
<vulnerable_code>import java.util.Map; import org.jetbrains.annotations.ApiStatus.Internal; import org.jetbrains.annotations.NotNull; /** * Dependency relocator. */ public class DependencyRelocator { private static final String RELOCATED_FILENAME = "%s-relocated.jar"; private final Dragonfly dragonfly; private ...
<vulnerable_code> */ public class Relocation { private final String from; private final String to; private Relocation(String from, String to) { this.from = from.replace("\\.", "."); this.to = to; } return new Relocation(from, to); } public String getFrom() { return from; } public String getTo() { ...
<vulnerable_code> */ public class MavenResolver implements IResolver<MavenDependency> { private static final String FORMAT = "%s%s/%s/%s/%s-%s.jar"; @Override public @Nullable String resolve(@NotNull Dragonfly dragonfly, @NotNull MavenDependency dependency) throws ResolveFailureException {<commit_title>[PATCH] fix...
<vulnerable_code>import dev.hypera.dragonfly.dependency.impl.MavenDependency; import dev.hypera.dragonfly.exceptions.ResolveFailureException; import dev.hypera.dragonfly.resolvers.IResolver; import java.io.StringReader; import java.util.Set; import java.util.stream.Collectors; import javax.xml.parsers.DocumentBuilder; ...
<vulnerable_code> ad_admin = 'Administrator@%s' % self.ad_domain tasks.kinit_as_user(self.master, ad_admin, self.master.config.ad_admin_password) err_string = ('ipa: ERROR: Insufficient access: SASL(-14):' ' authorization failure: Invalid credenti...
<vulnerable_code>void __ip_select_ident(struct iphdr *iph, int segs) { static u32 ip_idents_hashrnd __read_mostly; u32 hash, id; net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd)); hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol, ip_idents_h...
<vulnerable_code>static void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) { static u32 ip6_idents_hashrnd __read_mostly; u32 hash, id; net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd)); hash = __ipv6_addr_jhash(&rt->rt6i_dst.addr, ip6_idents_hashrnd); hash = __ipv6_addr_jhash(...
<vulnerable_code> c->interfaces_offset < bin->header.data_offset + bin->header.data_size) { p = r_buf_get_at (binfile->buf, c->interfaces_offset, NULL); int types_list_size = r_read_le32(p); if (types_list_size < 0 || types_list_size >= bin->header.types_size ) { return; }<commit_title>[PATCH] Fix ...
<vulnerable_code>import Quill from 'quill'; const CodeBlockContainer = Quill.import('formats/code-block-container'); CodeBlockContainer.tagName = 'PRE'; Quill.register(CodeBlockContainer, true); return { modules: { toolbar: this.get_toolbar_options(), table: true }, theme: 'snow' };<commit_title>[...
<vulnerable_code> columns = params.get('fields') elif params.get('columns'): columns = params.get('columns') elif params.get('fields'): columns = params.get('fields') else: columns = [['name', self.ref_doctype]] for df in frappe.get_meta(self.ref_doctype).fields: if params.get('sort_by_ne...
<vulnerable_code> def validate_value(self, value, col): df = col.df if df.fieldtype == "Select": select_options = [d for d in (df.options or '').split('\n') if d] if select_options and value not in select_options: options_string = ", ".join([frappe.bold(d) for d in select_options]) msg = _("Value must...
<vulnerable_code>import frappe import timeit import json from datetime import datetime from frappe import _ from frappe.utils import cint, flt, update_progress_bar, cstr from frappe.utils.csvutils import read_csv_content, get_csv_content_from_google_sheets def parse_value(self, value, col): df = col.df if isinsta...