text
stringlengths
79
3.72M
<vulnerable_code> } END_DO_SET (); new_tree = sqlp_view_def (NULL, new_tree, 1); new_tree = sqlc_union_dt_wrap (new_tree); sqlo_unor_replace_col_refs (so, &orig_sel, (ST *)new_tree->_.select_stmt.selection, sqlp_union_tree_select (tree)); new_tree->_.select_stmt.selection = (caddr_t *) ori...
<vulnerable_code> ST_P (view, INTERSECT_ALL_ST)) { view = sqlp_view_def (NULL, view, 1); view = sqlc_union_dt_wrap (view); } sqlo_scope (so, &view); if (ST_P (view, SELECT_STMT)) *ptree = t_listst (5, UNION_ST, left_oj_tree->_.table_ref.table, right_oj_tree->_.table_ref.table, NU...
<vulnerable_code>} ST * sqlc_union_dt_wrap (ST * tree) { ST * left = sqlp_union_tree_select (tree); ST * right = sqlp_union_tree_right (tree); if (left != right) { ST * texp, * sel; ST ** order =right->_.select_stmt.table_exp->_.table_exp.order_by; ptrlong flags = right->_.select_stmt.table...
<vulnerable_code> u32_t remainder_current; }; /* possible values for field "op" in struct ticker_user_op */ #define TICKER_USER_OP_TYPE_NONE 0 #define TICKER_USER_OP_TYPE_IDLE_GET 1 #define TICKER_USER_OP_TYPE_SLOT_GET 2 #define TICKER_USER_OP_TYPE_START 3 #define TICKER_USER_OP_TYPE_UPDATE 4 #define TICKER_U...
<vulnerable_code> * Function prototypes. Called from OS entry point mptctl_ioctl. * arg contents specific to function. */ static int mptctl_fw_download(unsigned long arg); static int mptctl_getiocinfo(unsigned long arg, unsigned int cmd); static int mptctl_gettargetinfo(unsigned long arg); static int mptctl_readtest(...
<vulnerable_code> } this.sync(); } RuleEngine.prototype.toJSON = function() { var rules = this.rules; if (rules instanceof Array) { rules = rules.map(function(rule) { rule.condition = rule.condition.toString(); rule.consequence = rule.co...
<vulnerable_code> static_cast<ContentTypeType>(msg.type))); } if (!msg.fragment) { if (msg.type == ContentType::application_data) { msg.fragment = folly::IOBuf::create(0); } else {<commit_title>[PATCH] Reject zero length handshake records.<commit_description>Summary: Zero length (all padding...
<vulnerable_code> expectSame(buf, "0123456789"); return getBuf("16000000"); })); EXPECT_NO_THROW(read_.read(queue_)); } TEST_F(EncryptedRecordTest, TestNoContentType) {<commit_title>[PATCH] Reject zero length handshake records.<commit_description>Summary: Zero length (all padding) handshake are ...
<vulnerable_code> // [databind#2410]: HikariCP/metricRegistry config s.add("com.zaxxer.hikari.HikariConfig"); // [databind#2420]: CXF/JAX-RS provider/XSLT s.add("org.apache.cxf.jaxrs.provider.XSLTJaxbProvider");<commit_title>[PATCH] Fix #2449<commit_description><fixed_code> // ...
<vulnerable_code>#ifdef HAVE_ICU else if (sVar == "clientencoding") { pUser->SetClientEncoding(sValue); PutModule("ClientEncoding = " + sValue); } #endif else<commit_title>[PATCH] Don't crash if user specified invalid encoding.<commit_description>This is CVE-2019-9917<fix...
<vulnerable_code>} void CIRCNetwork::SetEncoding(const CString& s) { m_sEncoding = s; if (GetIRCSock()) { GetIRCSock()->SetEncoding(s); } } <commit_title>[PATCH] Don't crash if user specified invalid encoding.<commit_description>This is CVE-2019-9917<fixed_code> } void CIRCNetwork::SetEncoding(con...
<vulnerable_code>void CUser::SetDenySetBindHost(bool b) { m_bDenySetBindHost = b; } void CUser::SetDefaultChanModes(const CString& s) { m_sDefaultChanModes = s; } void CUser::SetClientEncoding(const CString& s) { m_sClientEncoding = s; for (CClient* pClient : GetAllClients()) { pClient->SetEncoding(s); ...
<vulnerable_code> m_uiForceEncoding++; #ifdef HAVE_ICU for (Csock* pSock : GetManager()) { if (pSock->GetEncoding().empty()) { pSock->SetEncoding("UTF-8"); } } #endif } void CZNC::UnforceEncoding() { m_uiForceEncoding--; } bool CZNC::IsForcingEncoding() const { return m_uiForceEnc...
<vulnerable_code> ircd.Write(":n!u@h PRIVMSG nick :Hi\xF0, github issue #1229"); // "replacement character" client.ReadUntil("Hi\xEF\xBF\xBD, github issue"); } TEST_F(ZNCTest, ModpythonSocket) {<commit_title>[PATCH] Don't crash if user specified invalid encoding.<commit_description>This is CVE-2019-9917<fix...
<vulnerable_code> high, low; /* Auto fit text into bounding box. */ for ( ; ; draw_info->pointsize*=2.0) { text=AcquireString(caption); i=FormatMagickCaption(image,draw_info,split,&metrics,&text,<commit_title>[PATCH] https://github.com/ImageMagick/ImageMag...
<vulnerable_code> host = self.request.headers.get("Host") # If no header is provided, assume we can't verify origin if(origin_header == None or host == None): return False parsed_origin = urlparse(origin_header)<commit_title>[PATCH] s/==/is/<commit_description><fixed_code> ...
<vulnerable_code> /** * directory where files will go */ private final File workDir = IOUtil.createTempDir("CSPI.", null); private int sequenceIndexOfMapInRam = INVALID_SEQUENCE_INDEX; private Map<KEY, REC> mapInRam = null; private final FileAppendStreamLRUCache outputStreams;<commit_title>...
<vulnerable_code> } /** * Create a temporary subdirectory in the default temporary-file directory, using the given prefix and suffix to generate the name. * Note that this method is not completely safe, because it create a temporary file, deletes it, and then creates * a directory with the same n...
<vulnerable_code> @Test public void test() throws IOException { final Path outputDir = IOUtil.createTempDir(this.getClass().getSimpleName() + ".", ".tmp").toPath(); IOUtil.deleteOnExit(outputDir); final Path outputBam = File.createTempFile(this.getClass().getSimpleName() + ".", ".bam")....
<vulnerable_code> public void test_roundtrip_many_reads() throws IOException { // Create the input file final File outputDir = IOUtil.createTempDir(this.getClass().getSimpleName() + ".", ".tmp"); outputDir.deleteOnExit(); final Path output = new File(outputDir, "input.cram").toPath()...
<vulnerable_code> @Test public void test() throws IOException { final Path outputDir = IOUtil.createTempDir(this.getClass().getSimpleName() + ".", ".tmp").toPath(); IOUtil.deleteOnExit(outputDir); final Path outputCram = File.createTempFile(this.getClass().getSimpleName() + ".", FileExt...
<vulnerable_code> @Test(dataProvider = "indexedSequences") public void testCreate(final File indexedFile) throws Exception { // copy the file to index final File tempDir = IOUtil.createTempDir("FastaSequenceIndexCreatorTest", "testCreate"); final File copied = new File(tempDir, indexedFil...
<vulnerable_code> final File testBam = new File(TEST_DATA_DIR, "BAMFileIndexTest/index_test.bam"); //create a temp dir with a space in the name and copy the test file there final File tempDir = IOUtil.createTempDir("test spaces", ""); Assert.assertTrue(tempDir.getAbsolutePath().contains...
<vulnerable_code> @Test(dataProvider = "fileNamesForDelete") public void testDeletePathLocal(final List<String> fileNames) throws Exception { final File tmpDir = IOUtil.createTempDir("testDeletePath", ""); final List<Path> paths = createLocalFiles(tmpDir, fileNames); testDeletePaths(path...
<vulnerable_code> final File inputVCF, final Interval queryInterval) throws IOException { // copy the original file and create the index for the copy final File tempDir = IOUtil.createTempDir("testCreateTabixIndexFromVCF", null); tempDir.deleteOnExit(); final File ...
<vulnerable_code> @Test(dataProvider = "writeIndexData") public void testWriteBasedOnNonRegularFeatureFile(final File inputFile, final IndexFactory.IndexType type, final FeatureCodec codec) throws Exception { final File tmpFolder = IOUtil.createTempDir("NonRegultarFeatureFile", null); // create...
<vulnerable_code> final List<Interval> queryIntervals ) throws Exception { // copy the input file and create an index for the copy final File tempDir = IOUtil.createTempDir("testBedTabixIndex", null); tempDir.deleteOnExit(); final File tmpBed = new File(tempDir, inputBed.g...
<vulnerable_code> // Copy the input files into a temporary directory with embedded spaces in the name. // This test needs to include the associated .tbi file because we want to force execution // of the tabix code path. final File tempDir = IOUtil.createTempDir("test spaces", ""); ...
<vulnerable_code> @Test public void test() throws IOException { final Path outputDir = IOUtil.createTempDir(this.getClass().getSimpleName() + ".", ".tmp").toPath(); IOUtil.deleteOnExit(outputDir); final Path outputVcf = File.createTempFile(this.getClass().getSimpleName() + ".", FileExte...
<vulnerable_code> conn = cast(Connection, conn) try: return await conn.retry.call_with_retry( lambda: execute(conn, stack, raise_on_error), lambda error: self._disconnect_raise_reset(conn, error), ) finally: await self.reset() <...
<vulnerable_code> await connection.send_packed_command(connection.pack_command(*args), False) # Read response try: return await self.parse_response(connection, args[0], **kwargs) finally: # Release connection self._free.append(connection) async de...
<vulnerable_code>from absl.testing import parameterized import numpy as np from tensorflow.python.dlpack import dlpack from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.platform import test from tensorfl...
<vulnerable_code> static char *load_text_file(const char *path, unsigned flags); static void copy_file_from_chroot(struct dump_dir* dd, const char *name, const char *chroot_dir, const char *file_path); return true; } static bool exist_file_dir(const char *path) { struct stat buf; if (stat(path, &...
<vulnerable_code> FILENAME_OS_RELEASE, NULL }; static char* is_text_file(const char *name, ssize_t *sz) { /* We were using magic.h API to check for file being text, but it thinks * that file containing just "0" is not text (!!) * So, we do it ourself. */ int fd = open(name, O_RDONLY); ...
<vulnerable_code> return xopen3(pathname, flags, 0666); } void xunlink(const char *pathname) { if (unlink(pathname)) * do not report the type, they report DT_UNKNOWN for every dirent * (and this is not a bug in filesystem, this is allowed by standards). */ int is_regular_file(struct dirent *dent, const char ...
<vulnerable_code> return ops.op_env(); }, set: setEnv, delete: deleteEnv, }; <commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> return ops.op_env(); }, set: setEnv, has(key) { return getEnv(key) !== undefined; }, ...
<vulnerable_code> ObjectDefineProperties, ObjectDefineProperty, ObjectGetPrototypeOf, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, Promise, * @returns {IteratorResult<T>} */ function createIteratorResult(value, done) { const result = ObjectCreate(null); ObjectDefineProperti...
<vulnerable_code><commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> module.exports = { "name": "foobar", "version": "0.0.1", };
<vulnerable_code><commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> function loadConfigFile(fileName) { return require(fileName); } module.exports.loadConfigFile = loadConfigFile;
<vulnerable_code> obj.increment(); obj.set_value(10); assertEquals(obj.get_value(), 10); });<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> obj.increment(); obj.set_value(10); assertEquals(obj.get_value(), 10); assertEquals(objectWrap.NapiObject.f...
<vulnerable_code><commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; const properties = loadTestLibrary(); if (import.meta.ma...
<vulnerable_code> case "120000": // Symbolic link. break; case "160000": // Git submodule. yield* ls(path); break; default: { // Regular file.<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> case "120000": ...
<vulnerable_code> const ops = core.ops; const { abortSignal } = window.__bootstrap; const { pathFromURL } = window.__bootstrap.util; function writeFileSync( path, options.signal[abortSignal.add](abortHandler); } try { await core.opAsync( "op_write_file_async", pathFromURL...
<vulnerable_code> dispatch(this, this[_name], new Uint8Array(data)); // Send to listeners in other VMs. defer(() => core.opAsync("op_broadcast_send", rid, this[_name], data)); } close() {<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code...
<vulnerable_code>// Node.js v12.x to run actions, so this is Node code and not Deno code. const { spawn } = require("child_process"); const { dirname, resolve } = require("path"); const { StringDecoder } = require("string_decoder"); const { promisify } = require("util"); const fs = require("fs"); const utimes = promi...
<vulnerable_code> SafeArrayIterator, SafePromiseAll, Set, SetPrototypeEntries, SetPrototypeForEach, SetPrototypeHas, SetPrototypeKeys, SetPrototypeValues, Symbol, SymbolFor, SymbolIterator, TypeError, Uint32Array, Uint32ArrayPrototype, function createGPUSupporte...
<vulnerable_code> ReflectOwnKeys, RegExpPrototypeTest, Set, // TODO(lucacasonato): add SharedArrayBuffer to primordials // SharedArrayBuffer, String, }); } window.__bootstrap ??= {}; window.__bootstrap.webidl = { type, illegalConstructor, mixinPairIterable, configurePro...
<vulnerable_code> function getterOnly(getter) { return { get: getter, enumerable: true, configurable: true, };<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> function getterOnly(getter) { return { get: getter, set()...
<vulnerable_code> Location: location.locationConstructorDescriptor, location: location.locationDescriptor, Window: globalInterfaces.windowConstructorDescriptor, window: util.readOnly(globalThis), self: util.writable(globalThis), Navigator: util.nonEnumerable(Navigator), navigator: { con...
<vulnerable_code>if (Deno.build.os !== "linux") { throw new Error("SO_REUSEPORT is only supported on Linux"); }<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. if (Deno.build.os !== "...
<vulnerable_code>const addr = Deno.args[0] || "127.0.0.1:4500"; const [hostname, port] = addr.split(":"); const listener = Deno.listen({ hostname, port: Number(port) });<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. Al...
<vulnerable_code>var Gd = Object.create; var Ac = Object.defineProperty; var Xd = Object.getOwnPropertyDescriptor;<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. var Gd = Object.create...
<vulnerable_code>import { loadTestLibrary } from "../../../test_napi/common.js"; const lib = loadTestLibrary();<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { loadTestLibrary...
<vulnerable_code>// From https://github.com/just-js/benchmarks/tree/main/01-stdio // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. const blocksize = parseInt(Deno.args[0] || 65536); const buf = new Uint8Array(blocksize);<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#1731...
<vulnerable_code>const m = Deno[Deno.internal].require.Module; export const _cache = m._cache; export const _extensions = m._extensions;<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. ...
<vulnerable_code>// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. "use strict"; ((window) => {<commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. "use strict"; (...
<vulnerable_code><commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> #!/usr/bin/env -S deno run --unstable --allow-read --allow-run // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { getSources, ROOT_PATH } from "./util.js"; cons...
<vulnerable_code><commit_title>[PATCH 04/38] feat(runtime/os): add `Deno.env.has()` (#17315)<commit_description><fixed_code> // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; const date = loadTestLibrary(); Deno.test("napi date", f...
<vulnerable_code> int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) { u16 offset = sizeof(struct ipv6hdr); unsigned int packet_len = skb_tail_pointer(skb) - skb_network_header(skb); int found_rhdr = 0; while (offset <= packet_len) { struct ipv6_opt_hdr *exthdr; switch (**nexthdr) { exthdr = (st...
<vulnerable_code> break; } iframe->state = NGHTTP2_IB_READ_SETTINGS; if (iframe->payloadleft) {<commit_title>[PATCH] Earlier check for settings flood<commit_description><fixed_code> break; } /* Check the settings flood counter early to be safe */ if ...
<vulnerable_code> request_ = request; env_ = env; clear(); // clear response sessionInitialize(); if (!sessionActive() && !isAuthNeeded())<commit_title>[PATCH] [WebUI] Avoid clickjacking attacks<commit_description><fixed_code> request_ = request; env_ = env; // clear response clear...
<vulnerable_code><commit_title>[PATCH] Updated to include encrypting cookies, better protection<commit_description><fixed_code> const { randomBytes, createCipheriv, createDecipheriv } = require("crypto"); const ALGORITHM = "aes-256-cbc"; const encryptCookie = (cookie, _secret) => { /** * Encrypt a cookie using A...
<vulnerable_code>const { randomUUID } = require("crypto"); const csurf = (forbiddenMethods, excludedUrls) => { if (!forbiddenMethods) forbiddenMethods = ["POST"]; return (req, res, next) => { if (!req.cookies || !res.cookie) throw new Error("No Cookie middleware is installed"); if ( // if any e...
<vulnerable_code>const sinon = require("sinon"); const { mockRequest, mockResponse } = require("mock-req-res"); const csurf = require("./index"); describe("Default Options Tests", () => { before(() => { this.csrf = csurf(null, []); }); it("throws internal error if we have no cookies", () => { const req...
<vulnerable_code> run_id = task_instance.run_id task_id = task_instance.task_id map_index = task_instance.map_index self.triggers[trigger_id] = { "task": asyncio.create_task(self.run_trigger(trigger_id, trigger_instance)), ...
<vulnerable_code> # We always have to stop the runner job.runner.stop = True stdout = capsys.readouterr().out assert "test_dag/test_run/sensitive_arg_task/-1 (ID 1) starting" in stdout assert "some_password" not in stdout <commit_title>[PATCH] Add try_number to trigger key<commit_description...
<vulnerable_code> from rich.text import Text from ... import ui from ...config import FileDefinition from ...error import FormatError from ...format_pattern import FormatContext, TextFormatter BadSearchPattern = auto() BadReplacePattern = auto() SearchPatternNotFound = auto() @dataclass def __call__(...
<vulnerable_code> return message class KeystoneError(BumpItError): """Base for keystone file errors""" <commit_title>[PATCH] Prevent path traversal outside of project root.<commit_description><fixed_code> return message class PathTraversalError(BumpItError): def __init__(self, project_root: P...
<vulnerable_code> from . import format_pattern from .config import File from .error import FileGlobError, SearchTextNotFound from .format_pattern import FormatContext, TextFormatter, keys from .planned_changes import PlannedChange """ changes = [ _planned_change_for( file, confi...
<vulnerable_code> result = validator(definition) assert result is None<commit_title>[PATCH] Prevent path traversal outside of project root.<commit_description><fixed_code> result = validator(definition) assert result is None def test_validation__file_definition_traverses_above_project_root__failure( ...
<vulnerable_code> error.FileGlobError( Path(sd.SOME_ESCAPE_REQUIRED_TEXT), sd.SOME_ESCAPE_REQUIRED_TEXT ), error.KeystoneFileGlobError(sd.SOME_FILE_GLOB, []), error.KeystoneFileGlobError( sd.SOME_FILE_GLOB,<commit_title>[PATCH] Prevent path traversal outside of pro...
<vulnerable_code>from freezegun.api import FrozenDateTimeFactory from hyper_bump_it._hyper_bump_it import files from hyper_bump_it._hyper_bump_it.error import FileGlobError, SearchTextNotFound from hyper_bump_it._hyper_bump_it.files import PlannedChange from hyper_bump_it._hyper_bump_it.format_pattern import keys from...
<vulnerable_code>/* $OpenBSD: lka_filter.c,v 1.64 2020/12/20 13:27:46 martijn Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> filter_data(fs->id, line); goto nextline; case IO_DISCONNECTED: io_free(fs->io); fs->io = NULL; break; } } <commit_title>[PATCH] smtpd's filter state machine c...
<vulnerable_code> from vantage6.server.globals import RESOURCES from vantage6.server.default_roles import DefaultRole from vantage6.server.model.role import Role from vantage6.server.model.rule import Rule, Operation, Scope from vantage6.server.model.base import DatabaseSessionManager from vantage6.server.model.collabo...
<vulnerable_code> return default def id_in_list(id_: int, resource_list: list[db.Base], ) -> bool: """ Check if resource list contains a resource with a certain ID Parameters ---------- id_ : int ID of the resource resource_list : list[db.Base] List of resources Return...
<vulnerable_code> const copyableLookup = cellMethodLookupFactory('copyable', false); /** * Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names. * value = out; } else if (typeof prop === 'function') { /** * Allows for intera...
<vulnerable_code>/* * Copyright (c) 2021 libsixel developers. See `AUTHORS`. * Copyright (c) 2014-2016 Hayaki Saito * * 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...
<vulnerable_code> tiff_ifd[i].dng_levels.analogbalance[c] = 1.0f; } #endif memset(gpsdata, 0, sizeof gpsdata); memset(cblack, 0, sizeof cblack); memset(white, 0, sizeof white);<commit_title>[PATCH] X3F property table list fix<commit_description><fixed_code> tiff_ifd[i].dng_levels.analogbalance[c] = 1...
<vulnerable_code> /* Computed */ utf16_t *name; /* 0x0000 terminated UTF 16 */ utf16_t *value; /* 0x0000 terminated UTF 16 */ char *name_utf8; /* converted to UTF 8 */ char *value_utf8; /* converted to UTF 8 */ } x3f_property_t; typedef struct x3f_property_table_s { int _cur = _file...
<vulnerable_code> imgdata.sizes.raw_width = ID->columns; imgdata.sizes.raw_height = ID->rows; // Parse other params from property section DE = x3f_get_prop(x3f); if ((x3f_load_data(x3f, DE) == X3F_OK)) { // Parse property list DEH = &DE->header; x3f_property_list_t *PL = &DEH->data_subsection.pro...
<vulnerable_code> { "stream.pkt_retransmission", STREAM_PKT_RETRANSMISSION, }, { "stream.pkt_bad_window_update", STREAM_PKT_BAD_WINDOW_UPDATE, }, { "stream.reassembly_segment_before_base_seq", STREAM_REASSEMBLY_SEGMENT_BEFORE_BASE_SEQ, }, { "stream.reassembly_no_segment", STREAM_REASSEMBLY_NO_SEGMENT, }...
<vulnerable_code>static int StreamTcpHandleTimestamp(TcpSession * , Packet *); static int StreamTcpValidateRst(TcpSession * , Packet *); static inline int StreamTcpValidateAck(TcpSession *ssn, TcpStream *, Packet *); extern int g_detect_disabled; if (state == ssn->state || PKT_IS_PSEUDOPKT(p)) return; ...
<vulnerable_code>{ u32_t r_addr_start; u32_t r_addr_end; r_addr_start = SYSMPU->WORD[r_index][0]; r_addr_end = SYSMPU->WORD[r_index][1]; if (start >= r_addr_start && (start + size - 1) <= r_addr_end) { return 1; } <commit_title>[PATCH] syscalls: arm: Fix possible overflow in is_in_region function<commit_descr...
<vulnerable_code> struct timespec tstamp; /* trigger tstamp */ wait_queue_head_t qchange_sleep; struct fasync_struct *fasync; struct mutex tread_sem; }; /* list of timers */ return -ENOMEM; spin_lock_init(&tu->qlock); init_waitqueue_head(&tu->qchange_sleep); mutex_init(&tu->tread_sem); tu->ticks = 1; tu->qu...
<vulnerable_code> if self.use_beeline: hive_bin = "beeline" jdbc_url = f"jdbc:hive2://{conn.host}:{conn.port}/{conn.schema}" if conf.get("core", "security") == "kerberos": template = conn.extra_dejson.get("principal", "hive/_HOST@EXAMPLE.COM") return ...
<vulnerable_code>from airflow.exceptions import AirflowException from airflow.models.connection import Connection from airflow.models.dag import DAG from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook, HiveServer2Hook from airflow.secrets.environment_variables import CONN_ENV_PREFIX from airflow.util...
<vulnerable_code> assert(is_project(ins->op) || ins->op == op_table); if (list_length(i->columns) <= 1 || non_updatable_index(i->type)) { /* dummy append */ inserts->r = ins = rel_project(sql->sa, ins, rel_projections(sql, ins, NULL, 1, 1)); list_append(ins->exps, exp_label(sql->sa, exp_atom_lng(sql->sa, 0), ++s...
<vulnerable_code> ddata->draw_info=(DrawInfo *)NULL; } if (WMF_MAGICK_GetFontData(API)->ps_name) RelinquishMagickMemory(WMF_MAGICK_GetFontData(API)->ps_name); } /* if (image_info->ping != MagickFalse) { ipa_device_close(API); wmf_api_destroy(API); (void) CloseBlob(image); ...
<vulnerable_code>void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) { u32 data; void *vapic; if (test_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention)) apic_sync_pv_eoi_from_guest(vcpu, vcpu->arch.apic); if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) return; vapic = kmap_atomic(v...
<vulnerable_code> r = -EFAULT; if (copy_from_user(&va, argp, sizeof va)) goto out; r = 0; kvm_lapic_set_vapic_addr(vcpu, va.vapic_addr); break; } case KVM_X86_SETUP_MCE: { !kvm_event_needs_reinjection(vcpu); } static int vapic_enter(struct kvm_vcpu *vcpu) { struct kvm_lapic *apic = vcpu->arch.apic; ...
<vulnerable_code> import org.junit.Assert; public class SearchDirectionTest { @Test public void test_from_null_string() {<commit_title>[PATCH] fixed class name for what was actually meant<commit_description><fixed_code> import org.junit.Assert; public class SortDirectionTest { @Test public void tes...
<vulnerable_code> return !err; } static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) if (seize) { if (addr != 0) goto out; if (flags & ~(unsigned long)PTRACE_O_MASK) goto out; flags = PT_PTRACED | PT_SEIZED | (flags << PT_OPT_FLAG_SHIFT); } el...
<vulnerable_code> timestamp: { $gte: User.authTokenValidatedTime }, $or: [ { meetingId, chatId: { $eq: PUBLIC_GROUP_CHAT_ID } }, { chatId: { $in: chatsIds } }, ], }; return GroupChatMsg.find(selector);<commit_title>[PATCH] add meetingId to chatIds selector<commit_description><fixed_code> ...
<vulnerable_code> /* LHS Keysym. */ if (chr(s, '<')) { while (peek(s) != '>' && !eol(s)) buf_append(s, next(s)); if (!chr(s, '>')) { scanner_err(s, "unterminated keysym literal");<commit_title>[PATCH] compose: fix infinite loop in parser on some inputs<commit_description>...
<vulnerable_code> static { Set<String> s = new HashSet<>(); // Courtesy of [https://github.com/kantega/notsoserial]: // (and wrt [databind#1599] s.add("org.apache.commons.collections.functors.InvokerTransformer"); s.add("org.apache.commons.collections.functors.InstantiateTrans...
<vulnerable_code> size_t datalen = prep->datalen; int ret = 0; if (datalen <= 0 || datalen > 32767 || !prep->data) return -EINVAL; <commit_title>[PATCH] KEYS: Fix handling of stored error in a negatively<commit_description><fixed_code> size_t datalen = prep->datalen; int ret = 0; if (test_bit(KEY_FLAG_NEGATIVE...
<vulnerable_code> */ static int trusted_update(struct key *key, struct key_preparsed_payload *prep) { struct trusted_key_payload *p = key->payload.data[0]; struct trusted_key_payload *new_p; struct trusted_key_options *new_o; size_t datalen = prep->datalen; char *datablob; int ret = 0; if (!p->migratable) ret...
<vulnerable_code> if (ret == 0) { /* attach the new data, displacing the old */ zap = key->payload.data[0]; rcu_assign_keypointer(key, upayload); key->expiry = 0; }<commit_title>[PATCH] KEYS: Fix handling of stored error in a negatively<commit_description><fixed_code> if (ret == 0) { /* attach the new dat...
<vulnerable_code>static inline void isr_rx_conn_pkt_ctrl_rej(struct radio_pdu_node_rx *node_rx, u8_t *rx_enqueue) { if (0) { #if defined(CONFIG_BT_CTLR_PHY) } else if (_radio.conn_curr->llcp_phy.ack != _radio.conn_curr->llcp_phy.req) { isr_rx_conn_pkt_ctrl_rej_phy_upd(node_rx, rx_enqueue); #endif /* CONFIG_BT_...
<vulnerable_code> goto exit; } s_cmd->command += ec->cmd_offset; ret = cros_ec_cmd_xfer(ec->ec_dev, s_cmd); /* Only copy data to userland if data was received. */ if (ret < 0) goto exit; if (copy_to_user(arg, s_cmd, sizeof(*s_cmd) + u_cmd.insize)) ret = -EFAULT; exit: kfree(s_cmd);<commit_title>[PATCH] pl...