text
stringlengths
79
3.72M
<vulnerable_code> .toPath()) .collect(Collectors.toList()); content.replaceAll(line -> line.replaceAll("file://.*/fusion-endpoint", "file:///.../fusion-endpoint")); assertEquals("Rows in generated and expected files differ", expected.size(), conten...
<vulnerable_code>import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; public class Location implements Serializable { private static final String PATH_SEPARATOR = "/"; private static final String QUERY...
<vulnerable_code>package com.vaadin.flow.router; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; entry -> Collections.singletonList(entry.getValue()))); } /** * Returns query parameters information with support for mu...
<vulnerable_code> Location location = new Location("path?query"); assertEquals("path", location.getPath()); assertEquals(Collections.singletonMap("query", Collections.emptyList()), location.getQueryParameters().getParameters()); assertEquals("path?query", location.getPath...
<vulnerable_code>import org.junit.Assert; import org.junit.Test; import com.vaadin.flow.router.QueryParameters; public class QueryParametersTest { private Map<String, String> getSimpleInputParameters() { Map<String, String> inputParameters = new HashMap<>(); inputParameters.put("one", "1"); ...
<vulnerable_code>import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.regex.Pattern; import com.vaadin.flow.component.Component; import com.vaadin.flow.router.RouteParameters; import com.vaadin.flow.serv...
<vulnerable_code>package com.vaadin.flow.server; import javax.servlet.ServletContext; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.util.stream.Collectors; import java.util.stream.IntStream; import com.vaadin.flow.router.internal.HasUrlParamet...
<vulnerable_code> return request; } /** * Gets the Vaadin session. * pushMode = getUI().getPushConfiguration().getPushMode(); if (pushMode == null) { pushMode = getRequest().getService() .getDe...
<vulnerable_code> * inline dependency to add to bootstrap page * @param request * the request that is handled */ public void addInlineDependency(Inline inline, VaadinRequest request) { Inline.Wrapping type; // Determine the type as given or try to automatical...
<vulnerable_code> public <T extends Annotation> Optional<T> getPageConfigurationAnnotation( Class<T> annotationType) { WebComponentConfigurationRegistry registry = WebComponentConfigurationRegistry .getInstance(getRequest().getService().getContext()); r...
<vulnerable_code>/* * Copyright 2000-2021 Vaadin Ltd. * * 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...
<vulnerable_code>import java.util.regex.Pattern; import com.vaadin.flow.component.UI; import com.vaadin.flow.shared.ApplicationConstants; /** return PARENT_DIRECTORY_REGEX.matcher(path).find(); } }<commit_title>[PATCH 02/16] chore: ignore flaky tests (#10541)<commit_description><fixed_code> import java.u...
<vulnerable_code> private final QueryParameters queryParameters; /** * Creates a new {@link Location} object for given location string. This * string can contain relative path and query parameters, if needed. * * @param location * the relative location, not <code>null</code> ...
<vulnerable_code> assertEquals(Arrays.asList("foo", "bar", ""), location.getSegments()); } @Test(expected = IllegalArgumentException.class) public void parseLocationStartingWithSlash() { new Location("/foo/bar"); } @Test location.getQueryParameters().getParameters())...
<vulnerable_code> */ package com.vaadin.flow.router; import javax.servlet.http.HttpServletResponse; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.Optional; import org.slf4j.LoggerFa...
<vulnerable_code>import com.vaadin.flow.internal.BrowserLiveReloadAccess; import com.vaadin.flow.internal.ReflectTools; import com.vaadin.flow.internal.UsageStatisticsExporter; import com.vaadin.flow.server.communication.AtmospherePushConnection; import com.vaadin.flow.server.communication.PushConnectionFactory; import...
<vulnerable_code> private static InitialPageSettings createInitialPageSettingsObject( BootstrapHandler.BootstrapContext context) { UI ui = context.getUI(); VaadinRequest request = context.getRequest(); WebBrowser browser = context.getSession().getBrowser(); String pathInf...
<vulnerable_code> } @Override protected void initializeUIWithRouter(VaadinRequest request, UI ui) { if (request.getService().getBootstrapInitialPredicate() .includeInitialUidl(request)) { ui.getInternals().getRouter().initializeUI(ui, request); } } <commit_tit...
<vulnerable_code> super(request, response, ui.getInternals().getSession(), ui, callback); } } /** } @Override protected void initializeUIWithRouter(VaadinRequest request, UI ui) { String route = request .getParameter(ApplicationConstan...
<vulnerable_code> */ package com.vaadin.flow.component; import java.util.Arrays; import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import com.vaadin.flow.function.DeploymentConfiguration; import com.vaadin.flow.internal.CurrentInsta...
<vulnerable_code>import com.vaadin.flow.router.internal.AfterNavigationHandler; import com.vaadin.flow.router.internal.BeforeEnterHandler; import com.vaadin.flow.router.internal.BeforeLeaveHandler; import com.vaadin.flow.server.InvalidRouteConfigurationException; import com.vaadin.flow.server.MockVaadinServletService; ...
<vulnerable_code> @Test public void should_initializeUI_when_wrapperElement_null() { VaadinRequest request = mocks.createRequest(mocks, "/foo"); ui.getInternals().getRouter().initializeUI(ui, request); assertNull(ui.wrapperElement); // attached to body assertTrue(ui.getEl...
<vulnerable_code> // doesn't throw } @Test public void resolveNavigation_pathContainsDots_pathIsRelative_noException() { router.resolveNavigationTarget("/../dsfsdfsdf", Collections.emptyMap()); // doesn't throw } @Test<commit_title>[PATCH 02/16] chore: ignore flaky tests (#1...
<vulnerable_code> Mockito.when(router.resolveRouteNotFoundNavigationTarget()) .thenReturn(Optional.empty()); RouteRegistry registry = Mockito.mock(RouteRegistry.class); Mockito.when( router.resolveNavigationTarget(Mockito.any(), Mockito.any())) .the...
<vulnerable_code>import com.vaadin.flow.component.Tag; import com.vaadin.flow.component.UI; import com.vaadin.flow.component.page.Push; import com.vaadin.flow.router.Route; import com.vaadin.flow.router.RouteConfiguration; import com.vaadin.flow.router.Router; service.setRouteRegistry(routeRegistry); se...
<vulnerable_code>import com.vaadin.flow.component.page.Viewport; import com.vaadin.flow.di.Lookup; import com.vaadin.flow.di.ResourceProvider; import com.vaadin.flow.router.PageTitle; import com.vaadin.flow.router.ParentLayout; import com.vaadin.flow.router.Route; import com.vaadin.flow.router.RouteAlias; import com.va...
<vulnerable_code>import com.vaadin.flow.router.Route; import com.vaadin.flow.router.RouteConfiguration; import com.vaadin.flow.router.RouterLayout; import com.vaadin.flow.server.MockServletServiceSessionSetup; import com.vaadin.flow.server.VaadinServletRequest; import com.vaadin.flow.server.VaadinSession; ...
<vulnerable_code> * the request for which to do the lookup, not <code>null</code> * @return the class for which page configuration annotations should be * defined, or an empty optional if no such class is available * @deprecated use {@link #resolvePageConfigurationHolder(UI, Locati...
<vulnerable_code> package com.vaadin.flow.server.communication; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URLDecoder; import java.util.function.Function; import javax.servlet.http.HttpServletRequest; import elemental.json.JsonObject; im...
<vulnerable_code>import com.vaadin.flow.router.RouteNotFoundError; import com.vaadin.flow.router.RouterLayout; import com.vaadin.flow.server.BootstrapHandler.BootstrapContext; import com.vaadin.flow.server.startup.ApplicationRouteRegistry; import com.vaadin.flow.shared.communication.PushMode; import com.vaadin.flow.sha...
<vulnerable_code>import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.concurrent.LinkedBlockingDeque; import java.util.function.Supplier; import java.util.regex.Matcher; import com.vaadin.flow.function.DeploymentConfiguration; import com.vaadin.flow.internal.CurrentInstance; impo...
<vulnerable_code> @Test public void should_handleRequest_when_initTypeRequest() throws Exception { VaadinRequest request = mocks.createRequest(mocks, "/foo/?v-r=init&foo"); Assert.assertTrue(jsInitHandler.canHandleRequest(request)); } @Test public void should_not_han...
<vulnerable_code> } private boolean isProductionMode() throws IOException { JsonObject stats = readJsonFromUrl( getRootURL() + "/VAADIN/stats.json?v-r=init"); return stats.getObject("appConfig").getBoolean("productionMode"); } }<commit_title>[PATCH 02/16] chore: ignore flaky ...
<vulnerable_code> public static final String DEFAULT_NODE_VERSION = "v14.15.4"; public static final String DEFAULT_PNPM_VERSION = "5.15.1"; public static final String INSTALL_NODE_LOCALLY = "%n $ mvn com.github.eirslett:frontend-maven-plugin:1.10.0:install-node-and-npm " + "-DnodeVersion=\"" ...
<vulnerable_code> createStubNode(false, true, baseDir); createFakePnpm("5.15.1"); List<String> pnpmCommand = tools.getSuitablePnpm(); Assert.assertEquals("expected pnpm version 5.15.1 accepted", "pnpm", pnpmCommand.get(pnpmCommand.size() - 1)); } <commit_title>[PATCH 0...
<vulnerable_code> A `Tensor`. Each element is the result of quantizing and dequantizing the corresponding element of `input`. """ with ops.name_scope(name, "quantize_and_dequantize", [input]) as name: if not tensor_util.is_tensor(input): input = ops.convert_to_tensor(input) if axis is None: a...
<vulnerable_code> suc_count = fail_count = 0 skipped = set() action_on_existing = args.action_on_existing_key if action_on_existing == "fail": existing_key = set(session.scalars(select(Variable.key).where(Variable.key.in_(var_json)))) if existing_key: raise SystemExit(f"Failed...
<vulnerable_code> """Import variables.""" try: variable_dict = json.loads(request.files["file"].read()) action_if_exists = request.form.get("action_if_exists", "overwrite").lower() except Exception: self.update_redirect() flash("Missing file or synt...
<vulnerable_code> regs[a] = mrb_ary_entry(va, mrb_integer(vb)); break; case MRB_TT_HASH: regs[a] = mrb_hash_get(mrb, va, vb); break; case MRB_TT_STRING: switch (mrb_type(vb)) { case MRB_TT_INTEGER: case MRB_TT_STRING: case MRB_TT_RANGE: ...
<vulnerable_code>import java.util.Collections; import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; * @since 1.1 */ public DDFFileParser(DDFFileValidator ddfValidator) { factory = D...
<vulnerable_code> import org.w3c.dom.Node; import org.xml.sax.SAXException; /** * A DDF File Validator. public class DefaultDDFFileValidator implements DDFFileValidator { private static String LWM2M_V1_SCHEMA_PATH = "/schemas/LWM2M.xsd"; @Override public void validate(Node xmlToValidate) throws InvalidD...
<vulnerable_code> *******************************************************************************/ package org.eclipse.leshan.core.model; import static org.junit.jupiter.api.Assertions.assertThrows; import java.io.IOException; import org.junit.jupiter.api.Test; public class DDFFileParserTest { @Test public...
<vulnerable_code>#define SHELLCOMMAND 3 #endif netsnmp_feature_require(extract_table_row_data); netsnmp_feature_require(table_data_delete_table); #ifndef NETSNMP_NO_WRITE_SUPPORT * **********/ #ifndef NETSNMP_NO_WRITE_SUPPORT case MODE_SET_RESERVE1: /* * Validate the...
<vulnerable_code>from pathlib import Path from typing import Any, Dict, List, Union from fastapi import APIRouter, FastAPI, File, Header, Query, UploadFile from pydantic import BaseModel app = FastAPI(title="My Test API", description="An API for testing openapi-python-client",) an_enum_value: AnEnum nested_l...
<vulnerable_code>from dataclasses import asdict from datetime import date, datetime from typing import Any, Dict, List, Optional, Union, cast import httpx def get_user_list( *, client: Client, an_enum_value: List[AnEnum], some_date: Union[date, datetime], ) -> Union[ List[AModel], HTTPValidationError, ]: ...
<vulnerable_code>from __future__ import annotations from dataclasses import dataclass, field from datetime import date, datetime from typing import Any, Dict, List, Optional, Union, cast from .an_enum import AnEnum """ A Model for testing all the ways custom objects can be used """ an_enum_value: AnEnum ...
<vulnerable_code> self.package_name: str = self.package_name_override or self.project_name.replace("-", "_") self.package_dir: Path = self.project_dir / self.package_name self.package_description: str = f"A client library for accessing {self.openapi.title}" self.version: str = openapi.ve...
<vulnerable_code> """ Error raised when there's a problem creating a Property """ header = "Problem creating a Property: "<commit_title>[PATCH] Merge pull request from GHSA-9x4c-63pf-525f<commit_description>* All strings used as file/directory names are now sanitized to address the path traversal vulnerabilitie...
<vulnerable_code>from __future__ import annotations from dataclasses import InitVar, dataclass, field from typing import Any, ClassVar, Dict, Generic, List, Optional, Set, TypeVar, Union from .. import schema as oai from .. import utils from .errors import PropertyError from .reference import Reference ...
<vulnerable_code>import re import stringcase def _sanitize(value: str) -> str: return re.sub(r"[^\w _-]+", "", value) def group_title(value: str) -> str: value = re.sub(r"([A-Z]{2,})([A-Z][a-z]|[ -_]|$)", lambda m: m.group(1).title() + m.group(2), value.strip()) value = re.sub(r"(^|[ _-])([A-Z])", lamb...
<vulnerable_code>from pydantic.error_wrappers import ErrorWrapper import openapi_python_client.schema as oai from openapi_python_client import GeneratorError from openapi_python_client.parser.errors import ParseError MODULE_NAME = "openapi_python_client.parser.openapi" responses=mocker.MagicMock(), ...
<vulnerable_code>import pytest import openapi_python_client.schema as oai from openapi_python_client.parser.errors import PropertyError MODULE_NAME = "openapi_python_client.parser.properties" class TestProperty: def test_get_type_string(self): from openapi_python_client.parser.properties import Property...
<vulnerable_code> return; } memcpy(metadata, reply.data + reply.offset, reply.max_len - reply.offset); <commit_title>[PATCH] lib: updatehub: Init metadata variable<commit_description>Init metadata variable to a defined state. Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br><fixed_code> ...
<vulnerable_code> } else { let len = 0; while (className && className[len]) { element.classList.add(className[len]); len += 1; } } else { let len = 0; while (className && className[len]) { element.classList.remove(className[len]); ...
<vulnerable_code> * * @private * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties. * @returns {Array} */ countHide(border) { const values = Object.values(border);<commit...
<vulnerable_code> /** * Flag which determines build state of element. * * @type {boolean} */ this.buildState = false; } /**<commit_title>[PATCH] Fix all bugs found by SonarCloud<commit_description><fixed_code> /** * Flag which determines build state of element. * * @ty...
<vulnerable_code> /** * Flag which determines build state of element. * * @type {boolean} */ this.state = STATE_INITIALIZED; }<commit_title>[PATCH] Fix all bugs found by SonarCloud<commit_description><fixed_code> /** * Flag which determines build state of element. * * @ty...
<vulnerable_code> const colspan = th.getAttribute('colspan'); if (th && (colspan === null || colspan === 1)) { if (!this.pressed) { this.setupHandlePosition(th); }<commit_title>[PATCH] Fix all bugs found by SonarCloud<commit_description><fixed_code> const colspan = th.getAt...
<vulnerable_code>/** * Factory function designed for normalization data schema from different data structures of the selection ranges. * * @param {string} type Selection type which will be processed. * @param {object} [options] The normalization options. * @param {boolean} [options.keepDirection=false] If `true`, ...
<vulnerable_code> if last_name is not None and bname < last_name: raise ValueError("Fields not lexically sorted") value, exts_opts = _get_sshstr(exts_opts) result[bname] = bytes(value) last_name = bname return result fcrit = _FragList() for name, value in s...
<vulnerable_code> "username": "unittest", "firstname": "unit", "lastname": "test", "password": "super-secret", "email": "unit@test.org", } result = self.app.post("/api/user", headers=headers, json=new_user) ...
<vulnerable_code> next_tp = tp->tp_next; FOR_ALL_WINDOWS_IN_TAB(tp, wp) { if (wp->w_buffer == NULL) // Autocmd must have close the buffer already, skip. continue; buf = wp->w_buffer;<commit_title>[PATCH] patch 9.0.1857: [security] heap-use-after-free in is_qf_win()<commit_description>Probl...
<vulnerable_code> // set to NULL. // A window displaying a location list buffer will have the w_llist_ref // pointing to the location list. if (bt_quickfix(win->w_buffer)) if ((IS_QF_STACK(qi) && win->w_llist_ref == NULL) || (IS_LL_STACK(qi) && win->w_llist_ref == qi)) return TRUE;<commit_title>[...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1856, /**/<commit_title>[PATCH] patch 9.0.1857: [security] heap-use-after-free in is_qf_win()<commit_description>Problem: heap-use-after-free in is_qf_win() Solution: Check buffer is valid before accessing it Sig...
<vulnerable_code>/*! For license information please see app.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+8wg":function(t,e,a){"use strict";var s=a("3O3Y");a.n(s).a},"+lel":function(t,e,a){"use strict";a.r(e);var s=a("L9rL"),i=a("sK6a"),n=a("Hc5T"),o=a("ta7f");function r(t){return(r="func...
<vulnerable_code> switch (handler->flags) { case ACL_TYPE_ACCESS: if (acl) { umode_t mode = inode->i_mode; retval = posix_acl_equiv_mode(acl, &mode); if (retval < 0) goto err_out; else { struct iattr iattr; if (retval == 0) { /* * ACL can be represented * by the mode bits. So...
<vulnerable_code> case ACL_TYPE_ACCESS: name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { ret = posix_acl_equiv_mode(acl, &inode->i_mode); if (ret < 0) return ret; if (ret == 0) acl = NULL; } ret = 0; break;<commit_title>[PATCH] posix_acl: Clear SGID bit when setting file permissions<commit_desc...
<vulnerable_code> case ACL_TYPE_ACCESS: name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { ret = posix_acl_equiv_mode(acl, &new_mode); if (ret < 0) goto out; if (ret == 0) acl = NULL; } break; case ACL_TYPE_DEFAULT:<commit_title>[PATCH] posix_acl: Clear SGID bit when setting file permissions<commi...
<vulnerable_code> case ACL_TYPE_ACCESS: name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; if (acl) { error = posix_acl_equiv_mode(acl, &inode->i_mode); if (error < 0) return error; else { inode->i_ctime = CURRENT_TIME_SEC; mark_inode_dirty(inode); if (error == 0) acl = NULL; ...
<vulnerable_code> if (type == ACL_TYPE_ACCESS) { umode_t mode = inode->i_mode; error = posix_acl_equiv_mode(acl, &mode); if (error < 0) return error; if (error == 0) acl = NULL; if (mode != inode->i_mode) { inode->i_mode = mode; mark_inode_dirty(inode); } } if (acl) {<commit_title>[PATCH] ...
<vulnerable_code> case ACL_TYPE_ACCESS: xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { err = posix_acl_equiv_mode(acl, &inode->i_mode); if (err < 0) return err; } err = 0;<commit_title>[PATCH] posix_acl: Clear SGID bit when setting file permissions<commit_description>When file permissions are mo...
<vulnerable_code> case ACL_TYPE_ACCESS: xprefix = JFFS2_XPREFIX_ACL_ACCESS; if (acl) { umode_t mode = inode->i_mode; rc = posix_acl_equiv_mode(acl, &mode); if (rc < 0) return rc; if (inode->i_mode != mode) { struct iattr attr; if (rc < 0) return rc; } if (rc == 0) acl = NULL; ...
<vulnerable_code> case ACL_TYPE_ACCESS: ea_name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { rc = posix_acl_equiv_mode(acl, &inode->i_mode); if (rc < 0) return rc; inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode); if (rc == 0) acl = NULL; } break; case ACL_TYPE_DEFAULT:<commit_title>[...
<vulnerable_code> case ACL_TYPE_ACCESS: name_index = OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS; if (acl) { umode_t mode = inode->i_mode; ret = posix_acl_equiv_mode(acl, &mode); if (ret < 0) return ret; if (ret == 0) acl = NULL; ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode);<commit_ti...
<vulnerable_code> case ACL_TYPE_ACCESS: name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { umode_t mode = inode->i_mode; /* * can we represent this with the traditional file * mode permission bits? */ error = posix_acl_equiv_mode(acl, &mode); if (error < 0) { gossip_err("%s: posix_acl_equiv_...
<vulnerable_code>} EXPORT_SYMBOL_GPL(posix_acl_create); /* * Fix up the uids and gids in posix acl extended attributes in place. */<commit_title>[PATCH] posix_acl: Clear SGID bit when setting file permissions<commit_description>When file permissions are modified via chmod(2) and the user is not in the owning group o...
<vulnerable_code> return error; if (type == ACL_TYPE_ACCESS) { umode_t mode = inode->i_mode; error = posix_acl_equiv_mode(acl, &mode); if (error <= 0) { acl = NULL; if (error < 0) return error; } error = xfs_set_mode(inode, mode); if (error) return error;<commit_title>[PATCH] posix_acl: C...
<vulnerable_code> } int j; int count = 0; for (j = 0; j < section->size; j += 8) { ut64 addr64 = K_RPTR (buf + j); ut64 paddr64 = section->paddr + paddr + j; if (mode == R_K_CONSTRUCTOR_TO_ENTRY) {<commit_title>[PATCH] Fix #22349 - oobread in xnu kernelcache ##crash<commit_description>* Reproducer rabin...
<vulnerable_code> *(p + len++) = ' '; if (bt_help(wp->w_buffer)) { STRCPY(p + len, _("[Help]")); len += (int)STRLEN(p + len); } #ifdef FEAT_QUICKFIX if (wp->w_p_pvw) { STRCPY(p + len, _("[Preview]")); len += (int)STRLEN(p + len); } #endif #endif ) { STRCPY(p + len, "[+]"); len...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 3486, /**/<commit_title>[PATCH] patch 8.2.3487: illegal memory access if buffer name is very<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ ...
<vulnerable_code> #define VEC64(n) insn->detail->arm64.operands[n].vess #define VEC64_APPEND(sb, n, i) vector64_append(sb, handle, insn, n, i) #define VEC64_MASK(sh, sz) (bitmask_by_width[63]^(bitmask_by_width[sz-1]<<sh)) static void vector64_append(RStrBuf *sb, csh *handle, cs_insn *insn, int n, int i) { cs_arm64_op...
<vulnerable_code> } msr->mpd->mpp_state = 1; msr->mpd->mpp->last_header_name = NULL; } else { /* Header line. */ *error_msg = apr_psprintf(msr->mp, "Multipart: Part header too long."); return -1; } } else { char *header...
<vulnerable_code> return 1; } /* MODSEC_BUILD */ static int var_modsec_build_generate(modsec_rec *msr, msre_var *var, msre_rule *rule, PHASE_REQUEST_BODY ); /* GEO */ msre_engine_variable_register(engine, "GEO",<commit_title>[PATCH] Multipart parsing fixes and new MULTIPART_PART_HEADER...
<vulnerable_code> client->clientData = next; } if (client->sock != RFB_INVALID_SOCKET) rfbCloseSocket(client->sock); if (client->listenSock != RFB_INVALID_SOCKET)<commit_title>[PATCH] libvncclient: free vncRec memory in rfbClientCleanup()<commit_description>Otherwise we leak memory. Spotted by Ramin Faraj...
<vulnerable_code> switch (*next) { case '(': /* #2 */ if (top - op_stack > nr_parens) return ERR_PTR(-EINVAL); *(++top) = invert; continue; case '!': /* #3 */<commit_title>[PATCH] tracing: Have error path in predicate_parse() free its<commit_description><fixed_code> switch (*next) { case...
<vulnerable_code> if (!(ext = X509_get_ext(cert, l)) || !(ialt = X509V3_EXT_d2i(ext))) { pkiDebug("%s: found no subject alt name extensions\n", __FUNCTION__); retval = ENOENT; goto cleanup; } num_sans = sk_GENERAL_NAME_num(ialt); sk_GENERAL_NAME_pop_free(ialt, GENERAL_NAME_free);...
<vulnerable_code> &princs, plgctx->opts->allow_upn ? &upns : NULL, NULL); if (retval == ENOENT) { TRACE_PKINIT_SERVER_NO_SAN(context); goto out; } else if (retval) { pkiDeb...
<vulnerable_code> onConnectionOpen(terminalResponse) { this.conn.send(JSON.stringify({'Op': 'bind', 'SessionID': terminalResponse.id})); // Send at at least one resize event after attach so pty has the initial size this.onTerminalResize(this.term.screenSize.width, this.term.screenSize.height); this.i...
<vulnerable_code> } RL_LEVEL (pp) = level; RL_ISOLATE_LEVEL (pp) = isolate_level++; base_level_per_iso_level[isolate_level] = new_level; if (!FRIBIDI_IS_NEUTRAL (override))<commit_title>[PATCH] Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL<commit_description><fixed_cod...
<vulnerable_code> private String fullName; @Embedded private SsoInfo ssoInfo = new SsoInfo(); private String email; @Column(unique=true, nullable=false) private String accessToken = RandomStringUtils.randomAlphanumeric(ACCESS_TOKEN_LEN); @OneToMany(mappedBy="user", cascade=CascadeType.REMOVE)<commit_titl...
<vulnerable_code>package io.onedev.server.rest; import java.util.Collection; import javax.inject.Inject; import javax.inject.Singleton; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.w...
<vulnerable_code> private static boolean isValidHeaderValueAsciiString(AsciiString value) { final byte[] array = value.array(); final int start = value.arrayOffset(); byte b = array[start]; if (b < 0x21 || b == 0x7F) { return false; } int length = value.len...
<vulnerable_code> @Test public void decodingInvalidHeaderValueMustFailValidation() throws Exception { final DefaultHttp2HeadersDecoder decoder = new DefaultHttp2HeadersDecoder(true); verifyValidationFails(decoder, encode(b(":method"), b("GET"), b("test_header"), b("\0"))); verifyValidatio...
<vulnerable_code> process_rg: bool = False process_char: bool = False cm: bytes = cast(DecodedStreamObject, ft["/ToUnicode"]).get_data() for l in ( cm.strip() .replace(b"<", b" ") .replace(b">", b"") .replace(b"[", b" [ ") .replace(b"]", b" ] ") .split(b"\n...
<vulnerable_code> " range-coalescing-threshold = 80\n" + " range-count-limit = 16\n" + " decode-max-bytes-per-chunk = 1m\n" + " file-io-dispatcher = \"test-only\"\n" + "}"; Config config = ConfigFactory.parseString(testConfig);<commit_title>[PATCH] ...
<vulnerable_code> case TLS_ASYNC_BUILD: { int validSigAlgo = 0; /* Signature algorithm. */ if ((args->idx - args->begin) + ENUM_LEN + ENUM_LEN > totalSz) { } /* Check for public key of required type. */ #ifdef HAVE_ED25519 ...
<vulnerable_code>from airflow import settings from airflow.exceptions import AirflowException from airflow.executors.celery_executor import CeleryExecutor from airflow.executors.local_executor import LocalExecutor from airflow.models import DAG, DagBag, DagModel, TaskFail, TaskInstance, TaskReschedule from airflow.mode...
<vulnerable_code> expect(String(m)).toBe('https://www.example.com/path/xyz?var=123'); expect(String(n)).toBe('https://www.example.com/path/zyx?u'); // // Rebuild .search from .query and .hostname from .host // delete m.search; // delete m.hostname;<commit_titl...
<vulnerable_code> * URL parser module. * * @license MIT * @version 2.0.0 * @author Dumitru Uzun (DUzun.Me) * @umd AMD, Browser, CommonJs, noDeps */<commit_title>[PATCH] Fix potential vulnerability for "http://\\\\localhost"<commit_description><fixed_code> * URL parser module. * * @license MIT * @versi...
<vulnerable_code> * URL parser. * * @license MIT * @version 2.0.0 * @author Dumitru Uzun (DUzun.Me) * @umd AMD, Browser, CommonJs, noDeps */ } return parseUrl.call(URLJS, _url.origin + _path, undefined, parseQuery); } throw new SyntaxError(`Failed to construct 'URL': I...