text stringlengths 79 3.72M |
|---|
<vulnerable_code>/*
* Copyright (c) 2015. David Sowerby
*
* 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 law or... |
<vulnerable_code><commit_title>[PATCH] Fix #18 SQLInjection vulnerability cleared<commit_description>Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.<fixed_code>
/*
*
* * Copyright (c) 2016. David Sowerby
* *
* * Licensed under the Apach... |
<vulnerable_code>import uk.q3c.krail.core.user.opt.OptionDao;
import uk.q3c.krail.i18n.I18NKey;
import uk.q3c.krail.i18n.PatternDao;
import uk.q3c.krail.jpa.i18n.DefaultJpaPatternDao_LongInt;
import uk.q3c.krail.jpa.user.opt.DefaultOptionJpaDao_LongInt;
import java.util.ArrayList;
import java.util.HashMap;
*/
... |
<vulnerable_code>/*
* Copyright (c) 2015. David Sowerby
*
* 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 law or... |
<vulnerable_code>
package uk.q3c.krail.jpa.user.opt;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.inject.Inject;
import org.apache.onami.persist.EntityManagerProvider;
import org.apache.onami.persist.PersistenceUnitModule;
import org.apache.onami.persis... |
<vulnerable_code><commit_title>[PATCH] Fix #18 SQLInjection vulnerability cleared<commit_description>Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.<fixed_code>
/*
*
* * Copyright (c) 2016. David Sowerby
* *
* * Licensed under the Apach... |
<vulnerable_code><commit_title>[PATCH] Fix #18 SQLInjection vulnerability cleared<commit_description>Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.<fixed_code>
/*
*
* * Copyright (c) 2016. David Sowerby
* *
* * Licensed under the Apach... |
<vulnerable_code>/*
* Copyright (c) 2015. David Sowerby
*
* 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 law or... |
<vulnerable_code><commit_title>[PATCH] Fix #18 SQLInjection vulnerability cleared<commit_description>Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.<fixed_code>
/*
*
* * Copyright (c) 2016. David Sowerby
* *
* * Licensed under the Apach... |
<vulnerable_code>/*
* Copyright (c) 2015. David Sowerby
*
* 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 law or... |
<vulnerable_code>/*
* Copyright (c) 2015. David Sowerby
*
* 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 law or... |
<vulnerable_code> */
netif_stop_queue(sp->dev);
del_timer_sync(&sp->tx_t);
del_timer_sync(&sp->resync_t);
unregister_netdev(sp->dev);
/* Free all 6pack frame buffers after unreg. */
kfree(sp->rbuff);
kfree(sp->xbuff);<commit_title>[PATCH] drivers: hamradio: 6pack: fix UAF bug caused by mod_timer()<commit_des... |
<vulnerable_code> for (i=0; i<cbor_map_size(cbor_cose); i++) {
cbor_key = cbor_map_handle(cbor_cose)[i].key;
cbor_value = cbor_map_handle(cbor_cose)[i].value;
if (cbor_isa_negint(cbor_key) && cbor_get_int(cbor_key) == 1 && cbor_isa_bytestring(cbor_value)) {
has_x = 1;
... |
<vulnerable_code> "select_star": "read",
"table_metadata": "read",
"table_extra_metadata": "read",
"test_connection": "read",
"validate_parameters": "write",
"favorite_status": "read",
"add_favorite": "read",<commit_title>[PATCH] restrict test_connection also<commit_description><fixed_code>
... |
<vulnerable_code>void PropagateUploadEncrypted::slotFolderEncryptedMetadataReceived(const QJsonDocument &json, int statusCode)
{
qCDebug(lcPropagateUploadEncrypted) << "Metadata Received, Preparing it for the new file." << json.toVariant();
// Encrypt File!
_metadata.reset(new FolderMetadata(_propagator->account(... |
<vulnerable_code><commit_title>[PATCH] coap: Add unit tests for coap_parse_message()<commit_description>Testing is not exhaustive, yet surfaces some issues within the function.
This commit has been inspired by and includes a test for an issue found
by Chongqing Lei: coap_parse_message() does not check data_len if
data... |
<vulnerable_code> goto exit;
#endif
CU_basic_set_mode(CU_BRM_VERBOSE);
CU_basic_run_tests();
CU_basic_show_failures(CU_get_failure_list());<commit_title>[PATCH] coap: Add unit tests for coap_parse_message()<commit_description>Testing is not exhaustive, yet surfaces some issues within the function.
This... |
<vulnerable_code> , url = require('url')
, xtend = require('xtend');
function hasRel(x) {
return x && x.rel;
}
}
}
module.exports = function (linkHeader) {
if (!linkHeader) return null;
return linkHeader.split(/,\s*</)
.map(parseLink)<commit_title>[PATCH] Limit linkHeader length, throw error if exceeds... |
<vulnerable_code> )
t.end()
})<commit_title>[PATCH] Limit linkHeader length, throw error if exceeds (#25)<commit_description>* Limit linkheader length, add checkHeader func, update documentation
* indentation<fixed_code>
)
t.end()
})
test('parsing an extremely long link header', function (t) {
function paylo... |
<vulnerable_code>}
void IdentifierHashTable::growAndRehash(uint32_t newCapacity) {
assert(llvh::isPowerOf2_32(newCapacity) && "capacity must be power of 2");
CompactTable tmpTable(newCapacity, table_.getCurrentScale());
tmpTable.swap(table_);<commit_title>[PATCH] Re-sync with internal repository (#791)<commit_de... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code><commit_title>[PATCH] XCOMMONS-2426: Provide a component for filtering safe HTML<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* und... |
<vulnerable_code> result.should.have.property('aliases').with.containEql('cs');
should.strictEqual(result, hljs.getLanguage('csharp'))
});
});<commit_title>[PATCH] use null prototype objects for languages/aliases<commit_description><fixed_code>
result.should.have.property('aliases').with.containEql('cs');
... |
<vulnerable_code>
if (e) {
M4_LOG(GF_LOG_ERROR, ("Error while hinting (%s)\n", gf_error_to_string(e)));
if (!nb_done) return e;
}
init_payt++;
nb_done ++;<commit_title>[PATCH] fixed #2216<commit_description><fixed_code>
if (e) {
M4_LOG(GF_LOG_ERROR, ("Error while hinting (%s)\n", gf_error_to_string(... |
<vulnerable_code>//
// READERS
//
GF_Err gf_odf_read_descriptor(GF_BitStream *bs, GF_Descriptor *desc, u32 DescSize)
{
switch (desc->tag) {
case GF_ODF_IOD_TAG :
return GF_OK;
}
<commit_title>[PATCH] fixed #2216<commit_description><fixed_code>
//
// READERS
//
static GF_Err gf_odf_read_descriptor_internal(GF_B... |
<vulnerable_code>import javax.xml.transform.TransformerException;
import java.io.*;
import java.net.URL;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
{
log.error("Zip file '" + zipfile.getAbsolutePath() + "' does not exist, or is not readable.");
}
... |
<vulnerable_code>
setup(
name='sopel_plugins.channelmgnt',
version='2.0',
description='Channelmgnt plugin for Sopel',
long_description=readme,
long_description_content_type='text/markdown', # This is important!
author='MirahezeBot Contributors',
author_email='bots@miraheze.org',
url='ht... |
<vulnerable_code> return
nick = Identifier(text[1])
reason = ' '.join(text[2:])
if nick != bot.config.core.nick and trigger.account in chanops:
bot.write(['KICK', trigger.sender, nick, ':' + reason])
if dodeop:
@example('.ban Zppix')
def ban(bot, trigger):
... |
<vulnerable_code>var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '3.3.3',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',<commit_title>[PATCH] FIX VULNERABILITY<commit_description>jwcrypto accepts both compact... |
<vulnerable_code># The short X.Y version.
version = '3.3'
# The full version, including alpha/beta/rc tags.
release = '3.3.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.<commit_title>[PATCH] FIX VULNERABILITY<commit_description>jwcrypto accepts both c... |
<vulnerable_code>Functions for generating and verifying JSON Web Tokens.
"""
from datetime import datetime, timedelta
from calendar import timegm
from os import urandom
#pylint: disable=R0912,too-many-locals
def verify_jwt(jwt,
pub_key=None,
allowed_algs=None,
:raises: If the token... |
<vulnerable_code>
setup(
name='python_jwt',
version='3.3.3',
description="Module for generating and verifying JSON Web Tokens",
long_description=read('README.md'),
long_description_content_type='text/markdown',<commit_title>[PATCH] FIX VULNERABILITY<commit_description>jwcrypto accepts both compact a... |
<vulnerable_code><commit_title>[PATCH] FIX VULNERABILITY<commit_description>jwcrypto accepts both compact and JSON formats.
It was possible to use this to present a token with arbitrary
claims with a signature from another valid token.
See test/vulnerability_vows.py for an example.<fixed_code>
""" Test claim forgery v... |
<vulnerable_code> g_string_append_printf (new_exec, " @@ %s @@", arg);
else if (strcasecmp (arg, "%u") == 0)
g_string_append_printf (new_exec, " @@u %s @@", arg);
else if (strcmp (arg, "@@") == 0 || strcmp (arg, "@@u") == 0)
g_print (_("Skipping... |
<vulnerable_code> status=QuantizeImage(quantize_info,image,exception);
quantize_info=DestroyQuantizeInfo(quantize_info);
}
image->colors=2;
image->alpha_trait=UndefinedPixelTrait;
break;
}<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/issues/281<commit_... |
<vulnerable_code> Returns:
true/ false depending on whether the URL is valid or not
"""
return SnowflakeURLUtil.url_validator.match(url)
@staticmethod
def url_encode_str(target: str) -> str:<commit_title>[PATCH] Update src/snowflake/connector/url_util.py<commit_description>Co... |
<vulnerable_code> int i;
u32 tmp_strsize;
char *tmp_str;
GF_Err e;
ISOM_DECREASE_SIZE(ptr, 25)
ISOM_DECREASE_SIZE(ptr, 1)
tmp_str[i] = gf_bs_read_u8(bs);
tmp_strsize--;
if (!tmp_str[i])
break;
i++;
}
if (i) {
ptr->movie_identifier = gf_strdup(tmp_str);
}
ptr->server_entry_count = gf_bs_read_u8(b... |
<vulnerable_code> return half_md4_transform(hash, keyptr->secret);
}
#ifdef CONFIG_INET
__u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr,<commit_title>[PATCH] ipv6: make fragment identifications less predictable<commit_description>IPv6 fragment identification generation is way beyond what we use for
IPv4 :... |
<vulnerable_code> return cnt;
}
struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
{
struct inet_peer __rcu **stack[PEER_MAXDEPTH], ***stackptr;
struct inet_peer_base *base = family_to_base(daddr->family);
p->daddr = *daddr;
atomic_set(&p->refcnt, 1);
atomic_set(&p->rid, 0);
atomic_set(&... |
<vulnerable_code> return offset;
}
int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
{
struct sk_buff *frag;
skb_reset_network_header(skb);
memcpy(skb_network_header(skb), tmp_hdr, hlen);
ipv6_select_ident(fh);
fh->nexthdr = nexthdr;
fh->reserved = 0;
fh->frag_off = htons(IP6_MF);
... |
<vulnerable_code> fptr = (struct frag_hdr *)(skb_network_header(skb) + unfrag_ip6hlen);
fptr->nexthdr = nexthdr;
fptr->reserved = 0;
ipv6_select_ident(fptr);
/* Fragment the skb. ipv6 header and the remaining fields of the
* fragment header are updated in ipv6_gso_segment()<commit_title>[PATCH] ipv6: make fragme... |
<vulnerable_code>"use strict";
const exec = require("child_process").exec;
const util = require("util");
const p = require("path");
this.maskCmd = Boolean(options.maskCmd);
}
getFile(path, destination, workingDir) {
const fileName = path.replace(singleSlash, "\\");
const cmdArgs = util.format("%s %s"... |
<vulnerable_code>const testFile = "test.txt";
const client = new SambaClient({
address: process.argv[2],
username: "Guest",
});
async function run() {
await fs.writeFile(testFile, testFile);
await client.mkdir("test-directory");
console.log(`created test directory on samba share at ${client.address}`);
... |
<vulnerable_code> */
const missingFileRegex = /(NT_STATUS_OBJECT_NAME_NOT_FOUND|NT_STATUS_NO_SUCH_FILE)/im;
function wrap(str) {
return "'" + str + "'";
}
class SambaClient {
constructor(options) {
this.address = options.address;
this.username = wrap(options.username || "guest");
this.password = optio... |
<vulnerable_code> } else {
console.log(`test file does not exist on samba share at ${client.address}`);
}
}
run();<commit_title>[PATCH 01/11] converting to execa<commit_description><fixed_code>
} else {
console.log(`test file does not exist on samba share at ${client.address}`);
}
await fs.unlink(tes... |
<vulnerable_code> */
const missingFileRegex = /(NT_STATUS_OBJECT_NAME_NOT_FOUND|NT_STATUS_NO_SUCH_FILE)/im;
class SambaClient {
constructor(options) {
this.address = options.address;
this.username = options.username;
this.password = options.password;
this.domain = options.domain;
this.port = opti... |
<vulnerable_code>const testFile = "test.txt";
const client = new SambaClient({
address: process.argv[2]
});
async function run() {<commit_title>[PATCH 01/11] converting to execa<commit_description><fixed_code>
const testFile = "test.txt";
const client = new SambaClient({
address: process.argv[2],
});
async func... |
<vulnerable_code>"use strict";
const execa = require("execa");
const util = require("util");
const p = require("path");
const singleSlash = /\//g;
async getFile(path, destination, workingDir) {
const fileName = path.replace(singleSlash, "\\");
const cmdArgs = `'${fileName}' '${destination}'`;
return aw... |
<vulnerable_code> */
const missingFileRegex = /(NT_STATUS_OBJECT_NAME_NOT_FOUND|NT_STATUS_NO_SUCH_FILE)/im;
function wrap(str) {
return "'" + str + "'";
}
class SambaClient {
constructor(options) {
this.address = options.address;
this.username = wrap(options.username || "guest");
this.password = optio... |
<vulnerable_code> */
const missingFileRegex = /(NT_STATUS_OBJECT_NAME_NOT_FOUND|NT_STATUS_NO_SUCH_FILE)/im;
class SambaClient {
constructor(options) {
this.address = options.address;
}
async getFile(path, destination, workingDir) {
const fileName = path.replace(singleSlash, "\\");
const cleanedDesti... |
<vulnerable_code> attr->type = (type_and_name >> 16);
attr->name = ((type_and_name << 16) >> 16);
attr->len = geti32(in);
/* Allocate an extra byte for the null terminator. */
attr->buf = CHECKED_XCALLOC_ADDNULL(unsigned char, attr->len);
(void)getbuf(in, attr->buf, attr->len);
/* Always nul... |
<vulnerable_code> g_task_set_task_data (task, data, (GDestroyNotify)write_contents_data_free);
g_task_set_source_tag (task, gvdb_table_write_contents_async);
g_file_replace_contents_async (file, str->str, str->len,
NULL, FALSE,
G_FILE_CREATE_PRIVAT... |
<vulnerable_code> char *ptr;
char *end;
uint64_t cnt;
} post_var_data_t;
static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof)
{
char *ksep, *vsep, *val;
size_t klen, vlen;
size_t new_vlen;
return 0;
}
vsep = memchr(var->ptr, '&', var->end - var->ptr);
if (!vsep) {
if (!eof) {
... |
<vulnerable_code>"""
import re
import sys
from cloudinit.distros import ug_util
from cloudinit import log as logging
if len(randlist):
blurb = ("Set the following 'random' passwords\n",
'\n'.join(randlist))
sys.stderr.write("%s\n%s\n" % blurb)
if expire:
... |
<vulnerable_code>
with_logs = True
def setUp(self):
super(TestSetPasswordsHandle, self).setUp()
self.add_patch('cloudinit.config.cc_set_passwords.sys.stderr', 'm_err')
def test_handle_on_empty_config(self, *args):
"""handle logs that no password has changed when config is empty."""... |
<vulnerable_code> assert "ab" == kwargs["omode"]
# vi: ts=4 expandtab<commit_title>[PATCH] write passwords only to serial console, lock down<commit_description><fixed_code>
assert "ab" == kwargs["omode"]
@mock.patch("cloudinit.util.grp.getgrnam")
@mock.patch("cloudinit.util.os.setgid")
@mock.patch("c... |
<vulnerable_code>
def multi_log(text, console=True, stderr=True,
log=None, log_level=logging.DEBUG):
if stderr:
sys.stderr.write(text)
if console:
with open(conpath, 'w') as wfh:
wfh.write(text)
wfh.flush()
else:
# A containe... |
<vulnerable_code> # Which are not the same
assert shadow_users["harry"] != shadow_users["dick"]
def test_explicit_password_set_correctly(self, class_client):
"""Test that an explicitly-specified password is set correctly."""
shadow_users, _ = self._fetch_and_parse_etc_shadow(class_cl... |
<vulnerable_code><commit_title>[PATCH] write passwords only to serial console, lock down<commit_description><fixed_code>
"""Integration tests relating to cloud-init's logging."""
class TestVarLogCloudInitOutput:
"""Integration tests relating to /var/log/cloud-init-output.log."""
def test_var_log_cloud_init_o... |
<vulnerable_code> util.multi_log(logged_string)
self.assertEqual(logged_string, self.stdout.getvalue())
def test_logs_go_to_log_if_given(self):
log = mock.MagicMock()
logged_string = 'something very important'<commit_title>[PATCH] write passwords only to serial console, lock down<com... |
<vulnerable_code>
tok = getJsonToken(tokenVal, consumed, raw, end);
if (tok == JTOK_NONE || tok == JTOK_ERR)
return false;
raw += consumed;
bool isValueOpen = jsonTokenIsValue(tok) ||
if (expect(VALUE)) {
if (!isValueOpen)
return false;
... |
<vulnerable_code> arr1.merge(arr2);
}
static bool couldRecur(const Variant& v, const Array& arr) {
return v.isReferenced() ||
arr.get()->kind() == ArrayData::kGlobalsKind ||
arr.get()->kind() == ArrayData::kProxyKind;
}
static void php_array_merge_recursive(PointerSet &seen, bool check,
Variant &v = ... |
<vulnerable_code>
/* check properties version 2 */
rc = sqlite3_exec (priv->db, "SELECT * FROM properties_v2 LIMIT 1",
NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
statement = "CREATE TABLE properties_v2 ("
"device_id TEXT,"<commit_title>[PATCH] Fix a small memory leak in sqlite3_exec()<commit_desc... |
<vulnerable_code>
///////////////////////////////////////////////////////////////////////////////
static void php_str2num(bc_num *num, const char *str) {
const char *p;
if (!(p = strchr(str, '.'))) {
static String HHVM_FUNCTION(bcadd, const String& left, const String& right,
int64_t sc... |
<vulnerable_code> and detach this handle from there. */
curl_multi_remove_handle(data->multi, data);
if(data->multi_easy)
/* when curl_easy_perform() is used, it creates its own multi handle to
use and this is the one */
curl_multi_cleanup(data->multi_easy);
/* Destroy the timeout list th... |
<vulnerable_code>
from tensorflow.python.eager import context
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import errors
from tensorflow.python.framework import errors_impl
from tensorflow.python.framework import test_util
# Initializes the input tensor with array containing ... |
<vulnerable_code>
setup(
name='xblock-drag-and-drop-v2',
version='2.4.0',
description='XBlock - Drag-and-Drop v2',
packages=['drag_and_drop_v2'],
install_requires=[<commit_title>[PATCH] chore: bump version, update changelog<commit_description><fixed_code>
setup(
name='xblock-drag-and-drop-v2',
... |
<vulnerable_code>
// [databind#2660]: caucho-quercus
s.add("com.caucho.config.types.ResourceRef");
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
}
<commit_title>[PATCH] Block one more gadget type (bus-proxy, CVE-2020-10968)<commit_description>Merged from FasterXML/j... |
<vulnerable_code> FILE *rej;
char namebuf[PATH_MAX];
struct fragment *frag;
int cnt = 0;
struct strbuf sb = STRBUF_INIT;
for (cnt = 0, frag = patch->fragments; frag; frag = frag->next) {
memcpy(namebuf, patch->new_name, cnt);
memcpy(namebuf + cnt, ".rej", 5);
rej = fopen(namebuf, "w");
if (!rej)
return err... |
<vulnerable_code> else if (status == ARES_EDESTRUCTION)
{
end_hquery(hquery, status);
}
if (!hquery->remaining)<commit_title>[PATCH] Prevent possible double-free in ares_getaddrinfo() if<commit_description><fixed_code>
else if (status == ARES_EDESTRUCTION)
{
end_hquery(hquery, status);
... |
<vulnerable_code>import { relativeToFile, join, parseQueryString, buildQueryString } from '../src/index';
describe('relativeToFile', () => {
it('can make a dot path relative to a simple file', () => {
var file = 'some/file.html';
var path = './other/module';
expect(relativeToFile(path, file)).toBe('some... |
<vulnerable_code> GetRefAPI_t GetRefAPI;
Com_Printf( "----- Initializing Renderer ----\n" );
cl_renderer = Cvar_Get( "cl_renderer", DEFAULT_RENDER_LIBRARY, CVAR_ARCHIVE|CVAR_LATCH );
Com_sprintf( dllName, sizeof( dllName ), "%s_" ARCH_STRING DLL_EXT, cl_renderer->string );
<commit_title>[PATCH] Shared: Merge<co... |
<vulnerable_code> long hash;
//unz_s *zfi;
//void *temp;
hash = 0;
return -1;
}
//
// search through the path, one element at a time
//
}
// is the element a pak file?
if ( search->pack && search->pack->hashTable[hash] ) {
// look through all the pak file elements
pak = search->pack;
... |
<vulnerable_code>
Com_Printf( "----- Initializing Renderer ----\n" );
cl_renderer = Cvar_Get( "cl_renderer", DEFAULT_RENDER_LIBRARY, CVAR_ARCHIVE|CVAR_LATCH, "Which renderer library to use" );
Com_sprintf( dllName, sizeof( dllName ), "%s_" ARCH_STRING DLL_EXT, cl_renderer->string );
<commit_title>[PATCH] Shared: M... |
<vulnerable_code> //unz_s *zfi;
//void *temp;
int l;
hash = 0;
return -1;
}
//
// search through the path, one element at a time
//
continue;
}
// look through all the pak file elements
pak = search->pack;
pakFile = pak->hashTable[hash];<commit_title>[PATCH] Shared: Merge<commit... |
<vulnerable_code>{
void *dllhandle = NULL;
if ( useSystemLib )
{
Com_Printf( "Trying to load \"%s\"...\n", name );<commit_title>[PATCH] Shared: Merge<commit_description><fixed_code>
{
void *dllhandle = NULL;
// Don't load any DLLs that end with the pk3 extension
if ( COM_CompareExtension( name, ".pk3" ) )
{
... |
<vulnerable_code> if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
atomic_dec(&key->user->nikeys);
key_user_put(key->user);
/* now throw away the key memory */
if (key->type->destroy)
key->type->destroy(key);
kfree(key->description);
#ifdef KEY_DEBUGGING<commit_title>[PATCH] KEYS: close race between... |
<vulnerable_code> goto end_of_export;
}
targetDb = (const char*) sqlite3_value_text(argv[0]);
sourceDb = (argc == 2) ? (char *) sqlite3_value_text(argv[1]) : "main";
/* if the name of the target is not main, but the index returned is zero
there is a mismatch and we should not proceed */
targetDb_id... |
<vulnerable_code> } else {
/* UTF-8 string. */
p = njs_string_offset(string_prop.start, end, from);
p = njs_utf8_next(p, end);
i = from + 1;
while (i-- > to) {
pos = njs_utf8_prev(p);
<commit_title>[PATCH] Fixed Array.prototype.lastIn... |
<vulnerable_code> { njs_str("Array.prototype.lastIndexOf.call({0:'undefined', length:0}, 'undefined')"),
njs_str("-1") },
{ njs_str("[''].lastIndexOf.call('00000000000000000000000000000а00')"),
njs_str("-1") },
<commit_title>[PATCH] Fixed Array.prototype.lastIndexOf() with unicode string as<commit_d... |
<vulnerable_code>
@classmethod
def export_dashboards(cls, dashboard_ids):
class DashboardEncoder(json.JSONEncoder):
# pylint: disable=E0202
def default(self, o):
try:
vals = {
k: v for k, v in o.__dict__.items() if k !=... |
<vulnerable_code>from sqlalchemy.types import TEXT, TypeDecorator
logging.getLogger('MARKDOWN').setLevel(logging.INFO)
PY3K = sys.version_info >= (3, 0)
return o
def parse_human_timedelta(s):
"""
Returns ``datetime.datetime`` from natural language time deltas<commit_title>[PATCH] fix tests<commit_... |
<vulnerable_code> viz,
)
from superset.connectors.connector_registry import ConnectorRegistry
from superset.connectors.sqla.models import (
AnnotationDatasource, SqlaTable, SqlMetric, TableColumn,
)
from superset.forms import CsvToDatabaseForm
from superset.legacy import cast_form_data
import superset.models.cor... |
<vulnerable_code>from __future__ import unicode_literals
import json
import pickle
import unittest
from sqlalchemy.orm.session import make_transient
from superset import db
from superset.connectors.druid.models import (
DruidColumn, DruidDatasource, DruidMetric,
)
.format(birth_dash.id)
)
... |
<vulnerable_code> ui_color: str = "CornflowerBlue",
ui_fgcolor: str = "#000",
add_suffix_on_collision: bool = False,
) -> Callable[[Callable[FParams, FReturn]], _TaskGroupFactory[FParams, FReturn]]:
...
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_... |
<vulnerable_code> ui_color: str = "CornflowerBlue",
ui_fgcolor: str = "#000",
add_suffix_on_collision: bool = False,
):
from airflow.models.dag import DagContext
self.prefix_group_id = prefix_group_id
self.default_args = copy.deepcopy(default_args or {})
dag ... |
<vulnerable_code># under the License.
from __future__ import annotations
from airflow.decorators import setup, task, task_group, teardown
class TestSetupTearDownTask:
assert setup_task._is_setup
def test_marking_operator_as_setup_task(self, dag_maker):
from airflow.operators.bash import BashOper... |
<vulnerable_code><commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding c... |
<vulnerable_code>from __future__ import annotations
import json
import warnings
from copy import copy
from decimal import Decimal
from os.path import getsize
from typing import IO, TYPE_CHECKING, Any, Callable, Sequence
from uuid import uuid4
from airflow.models import BaseOperator
from airflow.providers.amazon.aws.h... |
<vulnerable_code> "airflow.providers.amazon.aws.operators.ecs.EcsBaseOperator",
"airflow.providers.amazon.aws.sensors.ecs.EcsBaseSensor",
"airflow.providers.amazon.aws.sensors.eks.EksBaseSensor",
}
MISSING_EXAMPLES_FOR_CLASSES = {<commit_title>[PATCH 001/147] Add gitSync optional env des... |
<vulnerable_code><commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.