text
stringlengths
79
3.72M
<vulnerable_code> if (leader1_len == 0) return (leader2_len == 0); // If first leader has 'f' flag, the lines can be joined only if the // second line does not have a leader. // If first leader has 'e' flag, the lines can never be joined. return FALSE; if (*p == COM_START) { if (*(ml_get(...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1224, /**/<commit_title>[PATCH] patch 9.0.1225: reading past the end of a line when<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1225, /**...
<vulnerable_code> * at runtime from the About dialog for additional information. *****************************************************************************/ export default class LocalStorageObjectProvider { constructor(spaceKey = 'mct') { this.localStorage = window.localStorage; * @private */ getSpac...
<vulnerable_code> app.stop(); } // websocket TEST_CASE("websocket_max_payload") { static std::string http_message = "GET /ws HTTP/1.1\r\nConnection: keep-alive, Upgrade\r\nupgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\nHost: localhost\r\n\r\n";<commit_title>[PA...
<vulnerable_code> "%hu->%s:%hu %s", eport, iaddr, iport, protocol); return -3; } /* IGDv1 (WANIPConnection:1 Service Template Version 1.01 / Nov 12, 2001) * - 2.2.20.PortMappingDescription : * Overwriting Previous / Existing Port Mappings:<commit_title>[PATCH] upnp_redirect(): accept NULL des...
<vulnerable_code> if ((len < 0) && (len != -ETIMEDOUT)) { LOG_ERROR("[emcute] error while receiving UDP packet\n"); return; } if (len >= 2) {<commit_title>[PATCH] emcute: never return from receive loop<commit_description>Without this change an attacker would be able to s...
<vulnerable_code> try: data = jwt.decode(token, DISPATCH_JWT_SECRET) except (JWKError, JWTError) as e: raise HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail=[{"msg": str(e)}] ) from None return data["email"] <commit_title>[PATCH] Remov...
<vulnerable_code> { *q++=(unsigned char) (GetPixelLuma(image,p) >= (QuantumRange/2.0) ? '0' : '1'); *q++=' '; if ((q-pixels+1) >= (ssize_t) sizeof(pixels)) { *q++='\n'; (void) WriteBlob(image,q-pixels,pixels); ...
<vulnerable_code> from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import test_util from tensorflow.python.ops import array_ops from tensorflow.python.ops import gradient_checker from tensorflow.python.ops import gradients_impl from tens...
<vulnerable_code> PUNFETCH; prev = p; num = scan_unsigned_octal_number(&p, end, 3, enc); if (num < 0) return ONIGERR_TOO_BIG_NUMBER; if (p == prev) { /* can't read nothing. */ num = 0; /* but, it's not error */ } if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { prev = p; num = scan_unsigned_octal_numbe...
<vulnerable_code> break; case OP_EXACT1: MOP_IN(OP_EXACT1); #if 0 DATA_ENSURE(1); if (*p != *s) goto fail; p++; s++; #endif if (*p != *s++) goto fail; DATA_ENSURE(0); p++; MOP_OUT; break; <commit_title>[PATCH 6/6] NEWS for oniguruma<commit_description><fixed_co...
<vulnerable_code> } else { UChar *q = p + reg->dmin; while (p < q) p += enclen(reg->enc, p); } }<commit_title>[PATCH 6/6] NEWS for oniguruma<commit_description><fixed_code> } else { UChar *q = p + reg->dmin; if (q >= end) return 0; /* fail */ while (p < q) p += enclen...
<vulnerable_code> else { if (reg->dmax != ONIG_INFINITE_DISTANCE) { *low = p - reg->dmax; if (*low > s) { *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s, *low, (const UChar** )low_prev); if (low_prev && IS_NULL(*low_prev)) (pprev ? pprev : str), *low); } ...
<vulnerable_code> } } *state = CCS_VALUE; *type = CCV_CLASS; return 0; }<commit_title>[PATCH 6/6] NEWS for oniguruma<commit_description><fixed_code> } } if (*state != CCS_START) *state = CCS_VALUE; *type = CCV_CLASS; return 0; }
<vulnerable_code> const col = datamap.propToCol(prop); const cellProperties = instance.getCellMeta(row, col); if (cellProperties.type === 'numeric' && typeof newValue === 'string' && newValue !== '' && isNumericLike(newValue)) { changes[i][3] = getPa...
<vulnerable_code> rangeEach, rangeEachReverse, isNumeric, } from 'handsontable/helpers/number'; describe('Number helper', () => { expect(isNumeric(null)).toBeFalsy(); expect(isNumeric('')).toBeFalsy(); expect(isNumeric(' ')).toBeFalsy(); expect(isNumeric('abcd')).toBeFalsy(); expect(...
<vulnerable_code>/** * Checks if value of n is a numeric one * http://jsperf.com/isnan-vs-isnumeric/4. * * @param {*} value The value to check. * @returns {boolean} */ export function isNumeric(value) { /* eslint-disable */ const t = typeof value; return t == 'number' ? !isNaN(value) && isFinite(value) : ...
<vulnerable_code> u32 tmpid; char *cmd = sl->rbuff; cf.can_id = 0; switch (*cmd) { case 'r': else return; *(u64 *) (&cf.data) = 0; /* clear payload */ /* RTR frames may have a dlc > 0 but they never have any data bytes */ if (!(cf.can_id & CAN_RTR_FLAG)) { for (i = 0; i < cf.can_dlc; i++) {<commit_title...
<vulnerable_code>/* * Copyright 2000-2020 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 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specifi...
<vulnerable_code>package com.vaadin.flow.component.upload.tests.it; import com.vaadin.flow.component.AttachEvent; import com.vaadin.flow.component.html.Div;<commit_title>[PATCH 1/3] chore: bump master to V22 (#1917)<commit_description><fixed_code> /* * Copyright 2000-2021 Vaadin Ltd. * * Licensed under the Apache L...
<vulnerable_code><commit_title>[PATCH 1/3] chore: bump master to V22 (#1917)<commit_description><fixed_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 Lic...
<vulnerable_code><commit_title>[PATCH 1/3] chore: bump master to V22 (#1917)<commit_description><fixed_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 Lic...
<vulnerable_code><commit_title>[PATCH 1/3] chore: bump master to V22 (#1917)<commit_description><fixed_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 Lic...
<vulnerable_code>/* * Copyright 2000-2017 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><commit_title>[PATCH 1/3] chore: bump master to V22 (#1917)<commit_description><fixed_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 Lic...
<vulnerable_code> logList2.size(), CoreMatchers.is(0)); } @Test public void i18nUploadTest() { open(); waitUntil(driver -> getUpload().isDisplayed()); WebElement upload = findElement(By.id("i18n-upload")); WebElement dropLabel = findInShadowRoot(upload, By.id...
<vulnerable_code>import elemental.json.JsonArray; import elemental.json.JsonNull; import elemental.json.JsonObject; /** * Server-side component for the {@code vaadin-upload} element. runBeforeClientResponse(ui -> { if (i18n == this.i18n) { JsonObject i18nObject = (JsonObject) Json...
<vulnerable_code> c = get_contract_with_gas_estimation(code) assert c.foo() == 2<commit_title>[PATCH] add tests<commit_description><fixed_code> c = get_contract_with_gas_estimation(code) assert c.foo() == 2 def test_uint256_addmod_evaluation_order(get_contract_with_gas_estimation): code = """ a: ...
<vulnerable_code> assert_side_effects_invoked(c1, lambda: c2.foo(c1.address, transact={})) def test_ecmul(get_contract_with_gas_estimation): ecmuller = """ x3: uint256[2] assert c2.foo(c1.address) == G1_times_three assert_side_effects_invoked(c1, lambda: c2.foo(c1.address, transact={}))<commit_title>[...
<vulnerable_code> c = get_contract_with_gas_estimation(code) assert c.foo() == 600<commit_title>[PATCH] add tests<commit_description><fixed_code> c = get_contract_with_gas_estimation(code) assert c.foo() == 600 def test_uint256_mulmod_evaluation_order(get_contract_with_gas_estimation): code = """...
<vulnerable_code> namespace et { el::Configurations LogHandler::setupLogHandler(int *argc, char ***argv) { // easylogging parse verbose arguments, see [Application Arguments] // in https://github.com/muflihun/easyloggingpp/blob/master/README.md START_EASYLOGGINGPP(*argc, *argv); // Easylogging configurations ...
<vulnerable_code> // Setup easylogging configurations el::Configurations defaultConf = LogHandler::setupLogHandler(&argc, &argv); defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false"); el::Loggers::setVerboseLevel(3); // default max log file size is 20MB for etserver string maxlogsize = ...
<vulnerable_code> // Setup easylogging configurations el::Configurations defaultConf = et::LogHandler::setupLogHandler(&argc, &argv); defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false"); el::Loggers::setVerboseLevel(3); // default max log file size is 20MB for etserver string maxl...
<vulnerable_code> ("v,verbose", "Enable verbose logging", cxxopts::value<int>()->default_value("0")) // ("k,keepalive", "Client keepalive duration in seconds", cxxopts::value<int>()) // ("logtostdout", "Write log to stdout") // ...
<vulnerable_code> // Not used by etterminal but easylogging uses this flag under the hood ("v,verbose", "Enable verbose logging", cxxopts::value<int>()->default_value("0")) // ("logtostdout", "Write log to stdout") // ("serverfifo", "If set, connects to the etserv...
<vulnerable_code> ("daemon", "Daemonize the server") // ("cfgfile", "Location of the config file", cxxopts::value<std::string>()->default_value("")) // ("logtostdout", "log to stdout") // ("pidfile", "Location of the pid file", cxxopts::va...
<vulnerable_code> el::Configurations defaultConf = et::LogHandler::setupLogHandler(&argc, &argv); et::LogHandler::setupStdoutLogger(); defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "true"); defaultConf.setGlobally(el::ConfigurationType::ToFile, "true"); // el::Loggers::setVerboseLevel(...
<vulnerable_code>void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { mk_vhost_close(sr); } if (sr->headers.location) { break; } sr->fd_file = fd; sr->bytes_to_send = finfo.size; sr->headers.content_length = finfo...
<vulnerable_code> sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; return fd; } return 0; } } return close(sr->fd_file); } <commit_title>[PATCH] Request: new request session flag to mark those files opened<commit_description><fixed_code> ...
<vulnerable_code> sld = sld_file.read() if isinstance(sld, str): sld = sld.encode('utf-8') dom = etree.XML(sld) elif sld_file and isfile(sld_file): with open(sld_file, "rb") as sld_file: sld = sld_file.read() elif...
<vulnerable_code>from geonode.decorators import on_ogc_backend from geonode.tests.base import GeoNodeBaseTestSupport from geonode.geoserver.views import _response_callback from geonode.geoserver.helpers import get_dataset_storetype from geonode.layers.populate_datasets_data import create_dataset_data from geonode.geos...
<vulnerable_code> if isfile(sld): with open(sld) as sld_file: sld = sld_file.read() etree.XML(sld) except Exception: logger.exception("The uploaded SLD file is not valid XML") raise Exception( ...
<vulnerable_code> setModelAttributes(model, account, null, accountService, administrationService, providerManagementService, uu, appFrameworkService); if (account.getPerson().getPersonId() == null) { setJsonFormData(model, account, null); } } sendErrorMessage(errors, model, messageSourceService, request...
<vulnerable_code> let oneHeader = null; let hashAlgos = []; headers.forEach(function(header) { oneHeader = header.match(/Hash: (.+)/); // get header value if (oneHeader) { oneHeader = oneHeader[1].replace(/\s/g, ''); // remove whitespace oneHeader = oneHeader.split(',');<commit_title>[PATCH] Re...
<vulnerable_code> expect(await sigInfo.verified).to.be.true; }); it('Supports non-human-readable notations', async function() { const { packets: [signature] } = await openpgp.readSignature({ armoredSignature: signature_with_non_human_readable_notations }); // There are no human-readable notations so `no...
<vulnerable_code> case MRB_TT_CLASS: case MRB_TT_MODULE: copy_class(mrb, dest, obj); /* fall through */ case MRB_TT_OBJECT: case MRB_TT_SCLASS: case MRB_TT_HASH:<commit_title>[PATCH] Clear `__classname__` of duped class/module; ref #4027<commit_description><fixed_code> case MRB_TT_CLA...
<vulnerable_code> // Check for the next breakpoint at or after the ":while" // or ":for". if (breakpoint != NULL) { *breakpoint = dbg_find_breakpoint( getline_equal(fgetline, cookie, getsourceline),<commit_title>[PATCH] patch 9.0.0360: crash when invalid line number on :for is<commi...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 359, /**/<commit_title>[PATCH] patch 9.0.0360: crash when invalid line number on :for is<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 360,...
<vulnerable_code>import framework.utils as utils @pytest.mark.skipif( platform.machine() != "x86_64", reason="The audit is based on cargo.lock which "<commit_title>[PATCH] Temporarily disable the cargo audit test.<commit_description>The security db (https://github.com/RustSec/cargo-audit) has broken compatibl...
<vulnerable_code> */ GSList *address_list = NULL; /** * @brief Location for redirection server. */ } } /** * @brief Sends a HTTP response. * host = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_HOST); if (host && g_utf8_validate (host, -1,...
<vulnerable_code>from __future__ import with_statement __author__ = 'Marcel Hellkamp' __version__ = '0.12.19' __license__ = 'MIT' # The gevent server adapter needs to patch some modules before they are imported<commit_title>[PATCH] Release of 0.12.20<commit_description>This release contains a security fix. Thanks Elt...
<vulnerable_code>{ callback_T *cb = &qftf_cb; list_T *qftf_list = NULL; // If 'quickfixtextfunc' is set, then use the user-supplied function to get // the text to display. Use the local value of 'quickfixtextfunc' if it is // create the dict argument if ((d = dict_alloc_lock(VAR_FIXED)) == NULL) ...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 259, /**/<commit_title>[PATCH] patch 9.0.0260: using freed memory when using<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 260, /**/ 25...
<vulnerable_code> bcm_rx_handler, op); list_del(&op->list); bcm_remove_op(op); return 1; /* done */ } REGMASK(op->can_id), bcm_rx_handler, op); bcm_remove_op(op); } #if IS_ENABLED(CONFIG_PROC_FS) /* remove procfs entry */ if (net->can.bcmproc_dir && bo->bcm_proc_read)<commit_titl...
<vulnerable_code>static int em_jmp_far(struct x86_emulate_ctxt *ctxt) { int rc; unsigned short sel, old_sel; struct desc_struct old_desc, new_desc; const struct x86_emulate_ops *ops = ctxt->ops; u8 cpl = ctxt->ops->cpl(ctxt); /* Assignment of RIP may only fail in 64-bit mode */ if (ctxt->mode == X86EMUL_MODE_PR...
<vulnerable_code>import java.util.Dictionary; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; ...
<vulnerable_code> ULONG ulDataOffset) { tOffloadSettingsFlags f = pContext->Offload.flags; tChecksumCheckResult res, resIp; tTcpIpPacketParsingResult ppr; ULONG flagsToCalculate = 0; res.value = 0; resIp.value = 0; //VIRTIO_NET_HDR_F_NEEDS_CSUM - w...
<vulnerable_code> ULONG tcpipDataAt; tTcpIpPacketParsingResult res = _res; tcpipDataAt = ipHeaderSize + sizeof(TCPHeader); res.xxpStatus = ppresXxpIncomplete; res.TcpUdp = ppresIsTCP; if (len >= tcpipDataAt) { TCPHeader *pTcpHeader = (TCPHeader *)RtlOffsetToPointer(pIpHeader, ipHeade...
<vulnerable_code> ipv6 = NULL; assert(data); if (!data || len <= 0 || len > 65535) { tcpedit_setwarn(tcpedit, "%s", "Unable to checksum packets with no L3+ data"); return TCPEDIT_WARN; } ipv4 = (ipv4_hdr_t *)data; if (ipv4->ip_v == 6) { ipv6 = (ipv6_hdr_t *)data; ...
<vulnerable_code> offset += 6; if (attr) { attr->type = R_BIN_JAVA_ATTR_TYPE_BOOTSTRAP_METHODS_ATTR; attr->info.bootstrap_methods_attr.num_bootstrap_methods = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.bootstrap_methods_attr.bootstrap_methods = r_list_newf (r_bin_java_bootstrap_method_free);<c...
<vulnerable_code> import json import logging import re import secrets import string self.deferrable = deferrable self.poll_interval = poll_interval self.remote_pod: k8s.V1Pod | None = None @cached_property def _incluster_namespace(self): ) self.invoke_defer_method() ...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> "use strict"; // Create the BMS Namespace if it doesn't exists var BMS = BMS || {}; var updateSDPTimeout; BMS.FUNCTIONS = { getDateTime: function() { var date = new Date(); return date.getFullYear() + "-" + date.get...
<vulnerable_code>"use strict";var BMS=BMS||{};BMS.FUNCTIONS={calculateDiscount:function(t,e=null){return""===e||null===e||"null"===e||0===e?parseFloat(Number(t)):"string"==typeof e&&e.indexOf("%")>0?parseFloat(Number(t)-Number(e.replace("%",""))/100*Number(t)):parseFloat(Number(t)-Number(e))},calculateTarifCharges:func...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if(typeof sipCredentials === "undefined") { throw new Error("Sorry! No SIP credentials found"); } // Set getUserMedia for all browsers navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitG...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if("undefined"==typeof sipCredentials)throw new Error("Sorry! No SIP credentials found");navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,void 0!==navigator.g...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if(typeof sipCredentials === "undefined") { throw new Error("Sorry! No SIP credentials found"); } // Set getUserMedia for all browsers navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitG...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if("undefined"==typeof sipCredentials)throw new Error("Sorry! No SIP credentials found");navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.getUserMed...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> /** * Events.js * * All events have been written here. */ // Load Poduct by filtered $(document).on("change", "#productCategoryFilter, #productBrandFilter, #productEditionFilter, #productGenericFilter, #productAuthorFilter", functio...
<vulnerable_code>$(document).on("change","#productCategoryFilter, #productBrandFilter, #productEditionFilter, #productGenericFilter, #productAuthorFilter",(function(){BMS.PRODUCT.showProduct({category:$("#productCategoryFilter").val(),brand:$("#productBrandFilter").val(),edition:$("#productEditionFilter").val(),generic...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> // Function to add thousand separator and decimal // TSD = thousand seprator and Decimal function tsd(num) { return Number(num).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,'); } /** * * @param {number} ms The number of millisecon...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> // Active the current menu var getCurrentURL = window.location.href.split("?"); $('ul.sidebar-menu a').each(function () { if ($(this).attr('href') == getCurrentURL[0]) { $(this).parents().css("display", "block"); ...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if(typeof sipCredentials === "undefined") { $(`.voiceMessageTerminal`).append(`<li style='color: red;'>Sorry! No SIP credentials found.</li>`); throw new Error("Sorry! No SIP credentials found"); } var socket = new JsSIP.WebSoc...
<vulnerable_code><commit_title>[PATCH] Bug Fixing<commit_description><fixed_code> if("undefined"==typeof sipCredentials)throw $(".voiceMessageTerminal").append("<li style='color: red;'>Sorry! No SIP credentials found.</li>"),new Error("Sorry! No SIP credentials found");var session,socket=new JsSIP.WebSocketInterface(si...
<vulnerable_code>/* {{{ gdCtxPrintf */ static void gdCtxPrintf(gdIOCtx * out, const char *format, ...) { char buf[4096]; int len; va_list args; } /* }}} */ /* {{{ gdImageXbmCtx */ BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out) { } } gdCtxPrintf(out, "#define %s_width...
<vulnerable_code> * this is a quirk of the implementation that means otherwise the free * space would be reported as one byte smaller than would be logically * expected. */ xBufferSizeBytes++; pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuf...
<vulnerable_code>#include "JSLib/JSLibInternal.h" #include "hermes/VM/Casting.h" #include "hermes/VM/Interpreter.h" #include "hermes/VM/StringPrimitive.h" #include "Interpreter-internal.h" namespace hermes { namespace vm { ExecutionStatus Interpreter::caseDirectEval( Runtime *runtime, PinnedHermesValue *frame...
<vulnerable_code> #endif // NDEBUG LLVM_DEBUG(dbgs() << "interpretFunction() called\n"); ScopedNativeDepthTracker depthTracker{runtime}; } CASE(SaveGenerator) { nextIP = IPADD(ip->iSaveGenerator.op1); goto doSaveGen; } CASE(SaveGeneratorLong) { nextIP = IPADD(ip->i...
<vulnerable_code>iterator.return(123); // CHECK-NEXT: 1 // CHECK-NEXT: get return<commit_title>[PATCH] Fix CVE-2020-1914 by using NEXTINST for SaveGeneratorLong<commit_description>Summary: If `SaveGeneratorLong` was emitted, it would accidentally jump to the wrong next instruction, based on how long SaveGenerator was. ...
<vulnerable_code> { super(); this.data = ["Safari.[\\d\\.]*","Firefox.[\\d\\.]*"," Chrome.[\\d\\.]*","Chromium.[\\d\\.]*","MSIE.[\\d\\.]","Opera\\\/[\\d\\.]*","Mozilla.[\\d\\.]*","AppleWebKit.[\\d\\.]*","Trident.[\\d\\.]*","Windows NT.[\\d\\.]*","Android [\\d\\.]*","Macintosh.","Ubuntu","Linux","[ ]Intel","Mac OS ...
<vulnerable_code> */ isCrawler(userAgent = undefined) { var agent = (typeof userAgent === 'undefined' || userAgent === null ? this.userAgent : userAgent); // test on compiled regx return false; } var matches = this.compiledRegexList.exec(agent.trim()); if ( matches )<commit_title>[PATCH 1/4] Update e...
<vulnerable_code> */ isCrawler(userAgent = undefined) { if(Buffer.byteLength(userAgent, 'utf8')>4096) { return false; } var agent = (typeof userAgent === 'undefined' || userAgent === null ? this.userAgent : userAgent);<commit_title>[PATCH 1/4] Update exclusions.js<commit_description>Exclude "kube-probe" u...
<vulnerable_code> for (;;) { u8 label_len; if (j >= length) return -1; GET8(label_len); if (!label_len) break; if (label_len & 0xc0) { *cp++ = '.'; } if (cp + label_len >= end) return -1; memcpy(cp, packet + j, label_len); cp += label_len; j += label_len;<commit_title>[PATCH] evdns: name_parse()...
<vulnerable_code>from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow.python.framework import test_util from tensorflow.python.ops import gen_math_ops from tensorflow.python.ops import gen_string_ops from tensorflow.python.platform import test pad_widt...
<vulnerable_code> * ``job_tracker``: Job tracker local|jobtracker:port. * ``namenode``: Namenode. * ``lib_jars``: Comma separated jar files to include in the classpath. * ``files``: Comma separated files to be copied to the map reduce cluster. * ``archives``: Comma separated arch...
<vulnerable_code> :param extra_export_options: Extra export options to pass as dict. If a key doesn't have a value, just pass an empty string to it. Don't include prefix of -- for sqoop options. """ template_fields: Sequence[str] = ( extra_import_options: dict[str, Any] | None = None...
<vulnerable_code> _config_json = { "namenode": "http://0.0.0.0:50070/", "job_tracker": "http://0.0.0.0:50030/", "libjars": "/path/to/jars", "files": "/path/to/files", "archives": "/path/to/archives", } mock_popen.return_value.__enter__.return_value = mock_proc ...
<vulnerable_code> (_dest) += (_len) ;\ }while(0); #define append_str_trans(_dest,_src,_len,_msg) \ append_str( (_dest), (_src), (_len) ); extern char version[]; extern int version_len; /* first line */ len += SIP_VERSION_LEN + 1/*space*/ + 3/*code*/ + 1/*space*/ + text->len + CRLF_LEN/*new line*/; /*headers ...
<vulnerable_code> BImgBuff = (unsigned char *) AcquireQuantumMemory((size_t) (ldblk),sizeof(double)); /* Ldblk was set in the check phase */ if (BImgBuff == NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); MinVal = 0; MaxVal = 0;<commit_title>[PATCH] https://github.com/I...
<vulnerable_code> size_t source_size; uint8_t *source_p = jerry_port_read_source (path_str_p, &source_size); /* Revert the error message. */ *path_str_end_p = ':'; /* 2. seek and print */ while (pos < source_size && curr_line < err_line) { if (source_p[...
<vulnerable_code>import org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyDecorator; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ld...
<vulnerable_code>public interface LdapClient { <T> T authenticate(String username, String password, Mapper<T> mapper); <T> List<T> search(String userSearchFilter, Object[] filterArgs, Mapper<T> mapper, int maxResult); void validate() throws NamingException; }<commit_title>[PATCH] Escape/encode values when...
<vulnerable_code> } } public <T> List<T> search(String filter, Object[] filterArgs, Mapper<T> mapper, int maxResult) { List<T> results = new ArrayList<>(); DirContext dirContext = getDirContext(ldapConfiguration, ldapConfiguration.getManagerDn(), ldapConfiguration.getPassword()); <commit...
<vulnerable_code>import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; class LdapTest { @Test void shouldBeAbleToSearchUsers() throws ParseException { assertThat(searchRequest.getTimeLimit()).isEqualTo(10); } @Test void shouldAbleToFetchResultsFromMultipleSea...
<vulnerable_code> if (rbuf != NULL) { ipv6 = rbuf->pkt; assert(ipv6 != NULL); } else { ipv6 = gnrc_pktbuf_add(NULL, NULL, sizeof(ipv6_hdr_t), #endif /* MODULE_GNRC_SIXLOWPAN_FRAG_VRB */ } else { /* for a fragmented datagram we know the overall length already *...
<vulnerable_code>def list_wiki(folderpath): folder_list = [] app.logger.info("Showing >>> 'all files'") for root, subfolder, files in os.walk(os.path.join(cfg.wiki_directory, folderpath)): if root[-1] == '/': root = root[:-1] for item in files:<commit_title>[PATCH] SECURITY PATCH...
<vulnerable_code> ); }); it('denies creating a hook with polluted data', async () => { const express = require('express'); const bodyParser = require('body-parser');<commit_title>[PATCH] fix: Remote code execution via MongoDB BSON parser through<commit_description><fixed_code> ); });...
<vulnerable_code> validateOnly: boolean = false, validSchemaController: SchemaController.SchemaController ): Promise<any> { const originalQuery = query; const originalUpdate = update; // Make a copy of the object, so we don't mutate the incoming data. validateOnly: boolean = false, validSch...
<vulnerable_code> } } this.checkProhibitedKeywords(data); // When the operation is complete, this.response may have several // fields. // response: the actual data to be returned delete this.data.objectId; } } this.checkProhibitedKeywords(this.data); }); }; return res...
<vulnerable_code> const base64 = req.body.toString('base64'); const file = new Parse.File(filename, { base64 }, contentType); const { metadata = {}, tags = {} } = req.fileData || {}; if (req.config && req.config.requestKeywordDenylist) { // Scan request data for denied keywords for (const key...
<vulnerable_code> } return false; } } module.exports = Utils;<commit_title>[PATCH] fix: Remote code execution via MongoDB BSON parser through<commit_description><fixed_code> } return false; } static checkProhibitedKeywords(config, data) { if (config?.requestKeywordDenylist) { // Scan re...