text
stringlengths
79
3.72M
<vulnerable_code>const {promisify} = require('util'); const graphviz = require('graphviz'); const exec = promisify(require('child_process').exec); const writeFile = promisify(require('fs').writeFile); /** * @param {Object} config * @return {Promise} */ function checkGraphvizInstalled(config) { if (config.graphVi...
<vulnerable_code> madge(__dirname + '/cjs/a.js', {graphVizPath: '/invalid/path'}) .then((res) => res.image('image.png')) .catch((err) => { err.message.should.match(/Could not execute .*gvpr \-V/); done(); }); });<commit_title>[PATCH] Fix potential command injection vulnerability<commit_descrip...
<vulnerable_code> } assert(len>=10); strncpy(str, "?[",len); itostr(token, &str[2], 10); strncat(str, "]",len); } void jslGetTokenString(char *str, size_t len) { if (lex->tk == LEX_ID) { strncpy(str, "ID:", len); strncat(str, jslGetTokenValueAsString(), len); } else if (lex->tk == LEX_STR) { ...
<vulnerable_code>#endif #endif } else { strncpy(result, "undefined", 10); } } jsiConsolePrintf("Couldn't convert pin function %d\n", pinFunc); return; } if (flags & JSPFTS_DEVICE) strncat(buf, devStr, bufSize); if (flags & JSPFTS_DEVICE_NUMBER) itostr(devIdx, &buf[strlen(buf)], 10); if ...
<vulnerable_code>} void ftoa_bounded_extra(JsVarFloat val,char *str, size_t len, int radix, int fractionalDigits) { const JsVarFloat stopAtError = 0.0000001; if (isnan(val)) strncpy(str,"NaN",len); else if (!isfinite(val)) { if (val<0) strncpy(str,"-Infinity",len); else strncpy(str,"Infinity",len); } e...
<vulnerable_code> const char *s = jsvGetConstString(v); if (s) { strncpy(str, s, len); return strlen(s); } else if (jsvIsInt(v)) { itostr(v->varData.integer, str, 10); jsvUnLock(stringVar); return l; } else { strncpy(str, "", len); jsExceptionHere(JSET_INTERNALERROR, "Variab...
<vulnerable_code> switch (field.fieldType) { case GF_SG_VRML_SFNODE: assert ( *(GF_Node **)field.far_ptr); gf_dump_vrml_node(sdump, *(GF_Node **)field.far_ptr, 0, NULL); return; case GF_SG_VRML_MFNODE: list = * ((GF_ChildNodeItem **) field.far_ptr);<commit_title>[PATCH] fixed #2146<commit_description><fixed_...
<vulnerable_code> if( j==pTab->iPKey ) continue; if( pTab->aCol[j].notNull==0 ) continue; sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3); sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG); jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v); zErr = sql...
<vulnerable_code> # Retrieve the latest, remote root.json *WITHOUT* verifying it just yet. # We will verify it soon if all goes well. latest_root_metadata_file = self._get_file( 'root.json', lambda f: f, 'meta', DEFAULT_ROOT_UPPERLENGTH, download_safely=False) latest_root_metadata = secu...
<vulnerable_code> search_directories.insert(0, custom_template_directory) loader = jinja2.FileSystemLoader(search_directories) env = jinja2.Environment(loader=loader, autoescape=autoescape) # Update the environment with our custom filters env.filters.update(<commit_title>[PA...
<vulnerable_code> add_threepid_template_success_html, ], template_dir, ) # Render templates that do not contain any placeholders self.email_notif_template_html, self.email_notif_template_text, ) = sel...
<vulnerable_code> def safe_markup(raw_html: str) -> jinja2.Markup: return jinja2.Markup( bleach.linkify( bleach.clean( def safe_text(raw_text: str) -> jinja2.Markup: """ Process text: treat it as HTML but escape any tags (ie. just escape the HTML) then linkify it. """ retur...
<vulnerable_code> 347, 353, 356, 374, 387, 424, 425, 430, 446, 459, 472, 485, 502, 503, 509, 508, 524, 523, 539, 553, 554, 559, 560, 561, 562, 567, 652, 698, 756, 801, 802, 806, 833, 871, 917, 939, 948, 957, 972, 984, 998, ...
<vulnerable_code> if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = ...
<vulnerable_code> }; } ); ajaxTest( "jQuery.ajax() - success callbacks (late binding)", 8, function( assert ) { return { setup: addGlobalEvents( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess", assert ),<commit_title>[PATCH] Ajax: Mitigate possible XSS vulnerability<commit_description>Fixes gh-2432<fixe...
<vulnerable_code> def test_verify_must_not_count_duplicate_keyids_towards_threshold(self): # Create and sign dummy metadata twice with same key signable = {"signed" : "test", "signatures" : []} signed = securesystemslib.formats.encode_canonical( signable["signed"]).encode("utf-8")<commit_title>[PA...
<vulnerable_code> * good -- Valid signature from key that is available in 'tuf.keydb', and is authorized for the passed role as per 'tuf.roledb' (authorization may be overwritten by passed 'keyids'). * unknown -- Signature from key that is not available in 'tuf.keydb'. * unknown signing schemes -...
<vulnerable_code> if (!_.isUndefined(errorMessage) && errorMessage !== null) { message += '<h2>' + t('gallery', 'Album cannot be shown') + '</h2>'; message += '<p>' + errorMessage + '</p>'; uploadAllowed = false; } else { message += '<h2>' + t('gallery',<commit_title>[PATCH] [stable9.1] Merge...
<vulnerable_code> testNormalizeSyntaxWithFailingMallocCallsFreeTimes("//:123#", URI_NORMALIZE_FRAGMENT); } TEST(FailingMemoryManagerSuite, ParseSingleUriExMm) { UriUriA uri; const char * const first = "k1=v1&k2=v2";<commit_title>[PATCH] tests: Cover OOM handling of empty URI elements in<commit_description><fixed_cod...
<vulnerable_code> } catch (error) { let errorText = '' if (error.response) errorText = error.response.data.error helpers.UI.showSnackbar(`Error: ${errorText}`, true) Log.error(errorText, error.response || error) yield put({ type: SAVE_EDIT_ACCOUNT.ERROR, error })<commit_title>[PATCH] refactor(accou...
<vulnerable_code>} apiUtils.sendApiError = function (res, errorNum, error) { return res.status(errorNum).json({ success: false, error: error }) } apiUtils.sendApiError_InvalidPostData = function (res) { return apiUtils.sendApiError(res, 400, 'Invalid Post Data')<commit_title>[PATCH] refactor(accounts): password se...
<vulnerable_code> const async = require('async') const _ = require('lodash') const winston = require('winston') const permissions = require('../../../permissions') const emitter = require('../../../emitter') const UserSchema = require('../../../models/user') const groupSchema = require('../../../models/group') const no...
<vulnerable_code> const _ = require('lodash') const async = require('async') const Chance = require('chance') const apiUtil = require('../apiUtils') const User = require('../../../models/user') const Group = require('../../../models/group') const Team = require('../../../models/team') const Department = require('../../...
<vulnerable_code> renderView(res, content) } settingsController.appearance = function (req, res) { if (!checkPerms(req, 'settings:view')) return res.redirect('/') <commit_title>[PATCH] refactor(accounts): password security enhancements<commit_description><fixed_code> renderView(res, content) } settingsController...
<vulnerable_code>const winston = require('../../logger') const moment = require('moment') const settingSchema = require('../../models/setting') const viewController = {} const viewdata = {} }) }, function (callback) { const settingsUtil = require('../../settings/settingsUtil') setti...
<vulnerable_code> .exec(callback) } departmentSchema.statics.getUserDepartments = function (userId, callback) { var self = this Teams.getTeamsOfUser(userId, function (err, teams) { if (err) return callback(err) return self .model(COLLECTION) .find({ teams: { $in: teams } }) .exec(cal...
<vulnerable_code> return q.exec(callback) } groupSchema.statics.getGroups = function (groupIds, callback) { if (_.isUndefined(groupIds)) return callback('Invalid Array of Group IDs - GroupSchema.GetGroups()') this.model(COLLECTION) .find({ _id: { $in: groupIds } }) .populate('members', '_id username full...
<vulnerable_code> return next() }) teamSchema.methods.addMember = function (memberId, callback) { if (_.isUndefined(memberId)) return callback('Invalid MemberId - TeamSchema.AddMember()') if (this.members === null) this.members = [] if (isMember(this.members, memberId)) return callback(null, false) this.me...
<vulnerable_code> }) }) .error(function (e) { $log.log('[trudesk:profile:updateUser] - ' + e.error.message) helpers.UI.showSnackbar('Error ' + e.error.message, true) }) } <commit_title>[PATCH] refactor(accounts): password security enhancements<commi...
<vulnerable_code> // errorMessageKey: '' // not used }) $.formUtils.addValidator({ name: 'confirmation', validatorFunction: function (value, $el, config, language, $form) {<commit_title>[PATCH] refactor(accounts): password security enhancements<commit_description><fixed_code> // erro...
<vulnerable_code> router.get('/settings', middleware.redirectToLogin, middleware.loadCommonData, controllers.settings.general) router.get('/settings/general', middleware.redirectToLogin, middleware.loadCommonData, controllers.settings.general) router.get( '/settings/appearance', middleware.redirectToLogin...
<vulnerable_code><commit_title>[PATCH] refactor(accounts): password security enhancements<commit_description><fixed_code> /* * . .o8 oooo * .o8 "888 `888 * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .ooo...
<vulnerable_code> s.maintenanceMode = parseSetting(settings, 'maintenanceMode:enable', false) const types = await ticketTypeSchema.getTypes() content.data.ticketTypes = _.sortBy(types, o => o.name) <commit_title>[PATCH] refactor(accounts): password security enhancements<commit_description><fixe...
<vulnerable_code>#include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> #include <asm/i387.h> struct crypto_fpu_ctx { { crypto_unregister_template(&crypto_fpu_tmpl); }<commit_title>[PATCH] crypto: include crypto- module prefix in template<commit_description>This adds the module loading prefix "cr...
<vulnerable_code> struct crypto_template *crypto_lookup_template(const char *name) { return try_then_request_module(__crypto_lookup_template(name), "%s", name); } EXPORT_SYMBOL_GPL(crypto_lookup_template); <commit_title>[PATCH] crypto: include crypto- module prefix in template<commit_description>This adds t...
<vulnerable_code> MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Simple AEAD wrapper for IPsec");<commit_title>[PATCH] crypto: include crypto- module prefix in template<commit_description>This adds the module loading prefix "crypto-" to the template lookup as well. For example, attempting to load 'vfat(blowfish)' via AF_A...
<vulnerable_code>MODULE_LICENSE("GPL"); MODULE_AUTHOR("Steffen Klassert <steffen.klassert@secunet.com>"); MODULE_DESCRIPTION("AEAD wrapper for IPsec with extended sequence numbers");<commit_title>[PATCH] crypto: include crypto- module prefix in template<commit_description>This adds the module loading prefix "crypto-" t...
<vulnerable_code>MODULE_DESCRIPTION("Counter with CBC MAC"); MODULE_ALIAS_CRYPTO("ccm_base"); MODULE_ALIAS_CRYPTO("rfc4309");<commit_title>[PATCH] crypto: include crypto- module prefix in template<commit_description>This adds the module loading prefix "crypto-" to the template lookup as well. For example, attempting t...
<vulnerable_code>def _unpack_uploaded_zipfile(path, target): with zipfile.ZipFile(path, "r") as zip: # sanity check map(_validate_archive_name, zip.namelist()) # unpack everything zip.extractall(target) def _unpack_uploaded_tarball(path, target): with tarfile.open(path, "r") as ...
<vulnerable_code> } /* now wait for the next timestamp */ if (buf->pts == AV_NOPTS_VALUE) { return write_to_fifo(s->fifo, buf); } <commit_title>[PATCH] avfilter/vf_fps: make sure the fifo is not empty before using<commit_description><fixed_code> } /* now wait for the next timestamp */ ...
<vulnerable_code>import isJpg from 'is-jpg'; import pathExists from 'path-exists'; import pify from 'pify'; import test from 'ava'; import m from '.'; const fsP = pify(fs); test('extract file', async t => { const tarFiles = await m(path.join(__dirname, 'fixtures', 'file.tar')); t.is(files[0].path, 'test.jpg'); t.t...
<vulnerable_code> class TestFirstPoC(metaclass=system_tests.CaseMeta): """ Regression test for the first bug described in: https://github.com/Exiv2/exiv2/issues/159 """ url = "https://github.com/Exiv2/exiv2/issues/159" filename = "$data_path/printStructure" commands = ["$exiv2 " + filename]...
<vulnerable_code><commit_title>[PATCH 1/3] [testsuite] Add reproducer for second bug from #159<commit_description>The bug described in the issue got resolved by PR #461 (slices).<fixed_code> # -*- coding: utf-8 -*- import system_tests class UncontrolledRecursion(metaclass=system_tests.CaseMeta): url = "https://g...
<vulnerable_code><commit_title>[PATCH 1/3] [testsuite] Add reproducer for second bug from #159<commit_description>The bug described in the issue got resolved by PR #461 (slices).<fixed_code> # -*- coding: utf-8 -*- import system_tests class OutOfBoundsReadInPrintStructure(metaclass=system_tests.CaseMeta): url =...
<vulnerable_code> parse_tone_only(flex, phaseptr, PhaseNo, j); // parse_tone_only(flex, PhaseNo); else parse_unknown(flex, phaseptr, PhaseNo, mw1, len); } } <commit_title>[PATCH] Skip long address words<commit_description><fixed_code> parse_tone_only(flex, phaseptr, PhaseNo, j); // parse_tone_onl...
<vulnerable_code> argumentNames: null, components: ['WebsocketSudo', 'Ajaxloader'], _initialize: function(){ this.Ajaxloader.setup(); $this = $(this); $this.parent().parent().remove(); }); this.$jqconsole = null; this.WebsocketSudo.setup(this.getVar...
<vulnerable_code> url = Regex(URL_REGEX, msg=_('Must be a URL'), flags=re.IGNORECASE) UUID_REGEX = ( r'^(?:urn:uuid:)?\{?[a-f0-9]{8}(?:-?[a-f0-9]{4}){3}-?[a-f0-9]{12}\}?$' )<commit_title>[PATCH] Add new file_uri validator<commit_description><fixed_code> url = Regex(URL_REGEX, msg=_('Must be a URL'), flags=re.IGNO...
<vulnerable_code> } // slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws) string = string.replace(/^(https?|ftp|wss?)?:[/\\]*/i, '$1://'); // extract protocol if (string.substring(0, 2) === '//') {<commit_title>[PATCH] fix(parse): handle excessive colons in s...
<vulnerable_code> idn: false, punycode: false } } ]; <commit_title>[PATCH] fix(parse): handle excessive colons in scheme delimiter<commit_description>reported by @huydoppa via huntr.dev<fixed_code> idn: false, punycode: false } }, { name: 'excessive colon in prot...
<vulnerable_code>/** * Indicates current available version on main page. */ function PMA_current_version() { var current = parseVersionString(pmaversion); var latest = parseVersionString(PMA_latest_version); var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + PMA_latest_version; ...
<vulnerable_code> return pfn; } int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) { gfn_t gfn, end_gfn; if (r) { printk(KERN_ERR "kvm_iommu_map_address:" "iommu failed to map pfn=%llx\n", pfn); goto unmap_pages; } return 0; unmap_pages: kvm_iommu_put_pages(kvm, slot->base_...
<vulnerable_code> NEXT; switch(TOKEN) { case IDENTIFIER: lvm_register_variable(VALUE, LVM_LONG); lvm_set_variable(&p, VALUE); AQL_ADD_PROCESSING_ATTRIBUTE(adt, VALUE); break; case STRING_VALUE: case FLOAT_VALUE: break; case INTEGER_VALUE: lvm_set_long(&p, *(long *)lexer->value); b...
<vulnerable_code> /* Registered variables for a LVM expression. Their values may be changed between executions of the expression. */ static variable_t variables[LVM_MAX_VARIABLE_ID - 1]; /* Range derivations of variables that are used for index searches. */ static derivation_t derivations[LVM_MAX_VARIABLE_ID - 1];...
<vulnerable_code> } } wanted_result = TRUE; if(AQL_GET_FLAGS(adt) & AQL_FLAG_INVERSE_LOGIC) { wanted_result = FALSE; } /* Check whether the given predicate is true for this tuple. */<commit_title>[PATCH] Enhanced LVM error checking.<commit_description><fixed_code> } } wanted_result = LVM_TRU...
<vulnerable_code> * * opaque psk_identity_hint<0..2^16-1>; */ len = (*p)[0] << 8 | (*p)[1]; *p += 2; <commit_title>[PATCH] Add bounds check before length read<commit_description><fixed_code> * * opaque psk_identity_hint<0..2^16-1>; */ if( (*p) > end - 2 ) { MBEDTLS_S...
<vulnerable_code> // move elemement to new place $attachmentLink.appendTo($element); // update text I18n._($attachmentLink, label, $attachmentLink.attr('download')); }; /**<commit_title>[PATCH] addressing jsverifyRngState 8b8f0d4ec2a67139b5, fixes HTML<co...
<vulnerable_code> mimeType.match(/\/pdf/i) ), results = []; prefix = prefix.replace(/%(s|d)/g, '%%'); postfix = postfix.replace(/%(s|d)/g, '%%'); $('body').html( '<div id="attachment" role=...
<vulnerable_code> fflush(stdout); } void ocall_malloc(size_t size, uint8_t **ret) { *ret = static_cast<uint8_t *>(malloc(size)); } <commit_title>[PATCH] Check ocall_malloc result pointer with sgx_is_outside_enclave<commit_description>This should reduce the enclave's attack surface by preventing an attacker from tri...
<vulnerable_code>#include <cstdio> #include "Enclave_t.h" int printf(const char *fmt, ...) { char buf[BUFSIZ] = {'\0'}; ocall_exit(exit_code); } void print_bytes(uint8_t *ptr, uint32_t len) { for (uint32_t i = 0; i < len; i++) { printf("%u", *(ptr + i));<commit_title>[PATCH] Check ocall_malloc result point...
<vulnerable_code> return PAGE_ALIGN(TASK_SIZE - gap - rnd); } /* * Bottom-up (legacy) layout on X86_32 did not support randomization, X86_64 * does, but not when emulating X86_32 */ static unsigned long mmap_legacy_base(unsigned long rnd) { if (mmap_is_ia32()) return TASK_UNMAPPED_BASE; else return TASK_UNMAP...
<vulnerable_code># include "nw_buf.h" # define NW_BUF_POOL_INIT_SIZE 64 # define NW_CACHE_INIT_SIZE 64 size_t nw_buf_size(nw_buf *buf) { { if (pool->free < pool->free_total) { pool->free_arr[pool->free++] = buf; } else { uint32_t new_free_total = pool->free_total * 2; void *new_arr ...
<vulnerable_code>{ static void *send_buf; static size_t send_buf_size; uint32_t pkg_size = RPC_PKG_HEAD_SIZE + pkg->ext_size + pkg->body_size; if (send_buf_size < pkg_size) { if (send_buf) free(send_buf); send_buf_size = pkg_size * 2; send_buf = malloc(send_buf_size);...
<vulnerable_code> if (upgrade == NULL || strcasecmp(upgrade, "websocket") != 0) goto error; const char *connection = http_request_get_header(info->request, "Connection"); if (connection == NULL) goto error; else { bool found_upgrade = false;<commit_title>[PATCH] fix memory corrupt...
<vulnerable_code> + ")"; } private String getUserOrgUnitPathsFilter( Set<String> userOrgUnitPaths ) { return Stream.concat(<commit_title>[PATCH] formatting<commit_description><fixed_code> + ")"; } private String getUserOrgUnitPathsFilter( Set<String> userOrgUnitPath...
<vulnerable_code> return (List<T>) store.getByUid( uids ); } @Override @Transactional( readOnly = true ) public <T extends IdentifiableObject> List<T> getAndValidateByUid( Class<T> type, Collection<String> uids )<commit_title>[PATCH] formatting<commit_description><fixed_code> retur...
<vulnerable_code> assertTrue( cd.contains( dataElementC ) ); assertTrue( cd.contains( dataElementD ) ); } @Test public void getAndValidateByUidTest() {<commit_title>[PATCH] formatting<commit_description><fixed_code> assertTrue( cd.contains( dataElementC ) ); assertTru...
<vulnerable_code> parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g, }; URI.leading_whitespace_expression = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/ // http://www.iana.org/assignments/uri-schemes.html // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well...
<vulnerable_code> idn: false, punycode: false } }, { name: 'excessive colon in protocol delimiter', url: 'http:://www.example.org:8080/hello:world',<commit_title>[PATCH] fix(parse): handle CR,LF,TAB<commit_description>reported by @haxatron via huntr.dev<fixed_code> idn: fals...
<vulnerable_code> "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"), "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/") # Just commented them out. # Can't really tell why keep failing in windows and sparc.<commit_title>[PATCH] bpo-35907: Avoid file reading as disallowing the unnecessary<commit_descriptio...
<vulnerable_code> name = 'open_' + urltype self.type = urltype name = name.replace('-', '_') if not hasattr(self, name): if proxy: return self.open_unknown_proxy(proxy, fullurl, data) else:<commit_title>[PATCH] bpo-35907: Avoid file reading as disal...
<vulnerable_code> #include <osquery/core/core.h> #include <osquery/core/flags.h> #include <osquery/logger/logger.h> #include <osquery/registry/registry_factory.h> #include <osquery/sql/sql.h> } } static inline void openOptimized(sqlite3*& db) { sqlite3_open(":memory:", &db); registerFilesystemExtensions(db); ...
<vulnerable_code> std::shared_ptr<SQLiteDBInstance> getTestDBC() { auto dbc = SQLiteDBManager::getUnique(); char* err = nullptr; std::vector<std::string> queries = { "CREATE TABLE test_table (username varchar(30) primary key, age int)", "INSERT INTO test_table VALUES (\"mike\", 23)", "INSERT INT...
<vulnerable_code> return Status(1, "Could not open database"); } sqlite3_stmt* stmt = nullptr; rc = sqlite3_prepare_v2(db, sqlite_query.c_str(), -1, &stmt, nullptr); if (rc != SQLITE_OK) {<commit_title>[PATCH] Merge pull request from GHSA-4g56-2482-x7q8<commit_description>* Proposed fix for attach tables vu...
<vulnerable_code>/*jshint node:true*/ "use strict"; var exec = require("child_process").exec; function runCommand(command, args, done) { if(typeof args === "function") { args = ""; } exec("p4 " + command + " " + (args || ""), function(err, stdOut, stdErr) { if(err) return done(err); ...
<vulnerable_code> } gf_fseek(AVI->fdes, AVI->video_index[AVI->video_pos].pos, SEEK_SET); if (avi_read(AVI->fdes,vidbuf,n) != (u32) n) { return -1; } AVI->video_pos++; return n; } todo = left; pos = AVI->track[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].pos + AVI->track[AVI->aptr].audio_po...
<vulnerable_code> /// Converts SPIR-V struct with a regular (according to `VulkanLayoutUtils`) /// offset to LLVM struct. Otherwise, the conversion is not supported. static std::optional<Type> convertStructTypeWithOffset(spirv::StructType type, LLVMTypeConverter &converter) { if (type != V...
<vulnerable_code> return getImpl()->memberTypesAndIsBodySet.getPointer()[index]; } StructType::ElementTypeRange StructType::getElementTypes() const { return ElementTypeRange(getImpl()->memberTypesAndIsBodySet.getPointer(), getNumElements()); } bool StructType::hasOffset() const { return g...
<vulnerable_code> setVisibility, setMaintenance, setSlug, }; function getConfig() { const requestOptions = { method: 'PUT', headers: authHeader(), body: JSON.stringify({ app: { slug: slug } }) }; return fetch(`${config.apiUrl}/apps/${appId}`, requestOptions).then(handleResponse); }<commit_title>[PATCH] [BUG] ...
<vulnerable_code> getAll, createUser, deleteUser, setPasswordFromToken, updateCurrentUser, changePassword, acceptInvite, getAvatar, updateAvatar, }; return fetch(`${config.apiUrl}/users/${id}`, requestOptions).then(handleResponse); } function setPasswordFromToken({ token, password, organization, rol...
<vulnerable_code> 'div(embeddedContent,oembed-provider-*) blockquote': { attributes: '*' }, 'div(embeddedContent,oembed-provider-*) script': { attributes...
<vulnerable_code> Cursor keyCur(key_chain.get()); auto key = keyCur.readFixedString(key_chain->computeChainDataLength()); Cursor valCur(value_chain.get()); auto value = valCur.readFixedString(value_chain->computeChainDataLength()); <commit_title>[PATCH] CVE-2016-1000109: Ignore Proxy HTTP header from fastcgi<co...
<vulnerable_code>} int unit_name_path_escape(const char *f, char **ret) { char *p, *s; assert(f); assert(ret); p = strdupa(f); if (!p) return -ENOMEM; if (!path_is_normalized(p)) return -EINVAL; /* Trunc...
<vulnerable_code> throw new Error('Query filter must be an object, got an array ', util.inspect(obj)); } const paths = Object.keys(obj); let i = paths.length; let _keys;<commit_title>[PATCH] fix(query): delete top-level `_bsontype` property in queries<commit_description><fixed_code> throw new Error('Que...
<vulnerable_code> if ((qp->q.last_in & INET_FRAG_FIRST_IN) && qp->q.fragments != NULL) { struct sk_buff *head = qp->q.fragments; rcu_read_lock(); head->dev = dev_get_by_index_rcu(net, qp->iif); if (!head->dev) goto out_rcu_unlock; /* * Only search router table for the head fragment, * when defragi...
<vulnerable_code> password=None, **kwargs, ): super().__init__(default_timeout=default_timeout) if servers is None: servers = ["127.0.0.1:11211"]<commit_title>[PATCH] fix: add missing serialization args extraction<commit_description><fixed_code> password=None, ...
<vulnerable_code>var fs = require('fs'); function createSecret() { const secret = require('crypto').randomBytes(32).toString('hex'); fs.writeFile(".env", "SECRET=" + secret, () => { }); //no need for the callback<commit_title>[PATCH] Adds comment for new createSecret function<commit_description>Signed-off-by: ...
<vulnerable_code> static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) { struct sockaddr_rc *sa = (struct sockaddr_rc *) addr; struct sock *sk = sock->sk; int chan = sa->rc_channel; int err = 0; BT_DBG("sk %p %pMR", sk, &sa->rc_bdaddr); if (!addr || addr->sa_family != AF_BLUETOO...
<vulnerable_code>/* radare - LGPL - Copyright 2009-2019 - pancake */ #include <r_types.h> #include <r_util.h> if (!obj->chained_starts[i]) { continue; } ut64 page_size = obj->chained_starts[i]->page_size; ut64 start = obj->segs[i].fileoff; ut64 end = start + obj->segs[i].filesize; if (end >= off && star...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 private CredentialsRefreshService credentialsRefreshS...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 private final int _channelNumber; /** Command bei...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 /** The assembler for this command - synchronised on -...
<vulnerable_code> private volatile ChannelManager _channelManager; /** Saved server properties field from connection.start */ private volatile Map<String, Object> _serverProperties; /** * Protected API - respond, in the driver thread, to a ShutdownSignal. this.credentialsRefreshService = p...
<vulnerable_code>package com.rabbitmq.client.impl; import com.rabbitmq.client.SocketConfigurator; protected final int connectionTimeout; protected final SocketConfigurator configurator; protected final boolean ssl; protected AbstractFrameHandlerFactory(int connectionTimeout, SocketConfigurator configu...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 import com.rabbitmq.client.AMQP; import com.rabbitmq.clie...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 private CredentialsRefreshService credentialsRefreshS...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 import java.util.Date; import java.util.List; import java....
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 /** Socket's outputstream - data to the broker - synch...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 public SocketFrameHandlerFactory(int connectionTimeou...
<vulnerable_code>// Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 import java.io.IOException; import java.nio.ByteBuffer; im...
<vulnerable_code>// Copyright (c) 2007-2022 VMware, Inc. or its affiliates. All rights reserved. // // This software, the RabbitMQ Java client library, is triple-licensed under the // Mozilla Public License 2.0 ("MPL"), the GNU General Public License version 2 private final List<NioLoopContext> nioLoopContexts; ...