text stringlengths 79 3.72M |
|---|
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
ad_group_criterion_customizer as gagr_ad_group_criterion_customizer,
)
from google.rpc import status_p... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import ad_group_criterion_label
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
fr... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import policy
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
ad_group_criterion as gagr_ad_group_criterion... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
ad_group_customizer as gagr_ad_group_customizer,
)
from google.rpc import status_pb2 # type: ignore<c... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
ad_group_extension_setting as gagr_ad_group_extension_setting,
)
from google.protobuf import field_mas... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import ad_group_label
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import ad_group as gagr_ad_group
from google.protobuf import field_mask_pb2 # type: ignore
from google.rpc import ... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import asset_group_asset
from google.protobuf import field_mask_pb2 # type: ignore
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_descript... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
asset_group_listing_group_filter as gagr_asset_group_listing_group_filter,
)
from google.protobuf impo... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import asset_group
from google.protobuf import field_mask_pb2 # type: ignore
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><f... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
asset_group_signal as gagr_asset_group_signal,
)
from google.rpc import status_pb2 # type: ignore<com... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import batch_job
from google.ads.googleads.v12.services.types import google_ads_service
from google.rpc import stat... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import billing_setup
__protobuf__ = proto.module(<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.providers.google.ads.... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import campaign_conversion_goal
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: i... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
campaign_draft as gagr_campaign_draft,
)
from google.protobuf import field_mask_pb2 # type: ignore<co... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import campaign as gagr_campaign
from google.protobuf import field_mask_pb2 # type: ignore
from google.rpc import ... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import offline_user_data
from google.ads.googleads.v12.enums.types import conversion_adjustment_type
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import offline_user_data
from google.ads.googleads.v12.enums.types import conversion_environment_enum
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import custom_audience
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
fr... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import customer_client_link
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignor... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import customer_conversion_goal
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: i... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import customer_label
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import customer_manager_link
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: igno... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import (
customer_negative_criterion as gagr_customer_negative_criterion,
)
from google.rpc import status_pb2 ... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import access_role as gage_access_role
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google.ads.googleads.v12.resources.types import customer as gagr_customer
f... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import (
customer_user_access_invitation,
)
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.providers.google.ads._ve... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import feed_item_set_link
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from air... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import feed_item_set
from google.protobuf import field_mask_pb2 # type: ignore
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description>... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import (
geo_target_constant as gagr_geo_target_constant,
)
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.provider... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import google_ads_field
__protobuf__ = proto.module(<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.providers.google.a... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import metrics as gagc_metrics
from google.ads.googleads.v12.common.types import segments as gagc_segments
from google.ads.googleads.v12.enums.types import (
response_content_type as gage_response_content_type,
)
from google... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.enums.types import month_of_year
from google.ads.googleads.v12.resources.types import invoice
__protobuf__ = proto.module(<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import ... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import keyword_plan_common
from google.ads.googleads.v12.enums.types import keyword_match_type
from google.ads.googleads.v12.enums.types import keyword_plan_keyword_annotation
from google.ads.googleads.v12.enums.types import (
... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import keyword_plan_common
from google.ads.googleads.v12.resources.types import (
keyword_plan as gagr_keyword_plan,
)
from google.protobuf import field_mask_pb2 # type: ignore<commit_title>[PATCH 001/147] Add gitSync optio... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import keyword_theme_constant
__protobuf__ = proto.module(<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.providers.go... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import merchant_center_link
from google.protobuf import field_mask_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignor... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import offline_user_data
from google.ads.googleads.v12.resources.types import offline_user_data_job
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<c... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.resources.types import payments_account
__protobuf__ = proto.module(<commit_title>[PATCH 001/147] Add gitSync optional env description (#29378)<commit_description><fixed_code>
#
import proto # type: ignore
from airflow.providers.google.a... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import criteria
from google.ads.googleads.v12.common.types import dates
from google.ads.googleads.v12.enums.types import frequency_cap_time_unit
from google.ads.googleads.v12.enums.types import reach_plan_age_range
from google.a... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import extensions
from google.ads.googleads.v12.enums.types import keyword_match_type
from google.ads.googleads.v12.resources.types import ad as gagr_ad
from google.rpc import status_pb2 # type: ignore
<commit_title>[PATCH 001... |
<vulnerable_code>#
import proto # type: ignore
from google.ads.googleads.v12.common.types import ad_type_infos
from google.ads.googleads.v12.common.types import criteria
from google.ads.googleads.v12.resources.types import (
keyword_theme_constant as gagr_keyword_theme_constant,
)
<commit_title>[PATCH 001/147] Ad... |
<vulnerable_code>from tempfile import NamedTemporaryFile
from typing import IO, Any
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.errors import GoogleAdsException
from google.ads.googleads.v10.services.services.customer_service import CustomerServiceClient
from google.ads.googleads.... |
<vulnerable_code> "elasticsearch": ["elasticsearch", "es.elastic", "elasticsearch_dsl"],
"google": [
"OpenSSL",
"google.ads",
"googleapiclient",
"google.auth",
"google_auth_httplib2",<commit_title>[PATCH 001/147] Add gitSync optional env descrip... |
<vulnerable_code># A list of patterns to ignore when finding files
autoapi_ignore = [
"*/airflow/_vendor/*",
"*/airflow/providers/google/ads/_vendor/*",
"*/airflow/executors/*",
"*/_internal*",
"*/node_modules/*",
autoapi_ignore.append("*/airflow/providers/*")
else:
autoapi_ignore.append("*/... |
<vulnerable_code> ("'urllib3.contrib.pyopenssl' module is deprecated and will be", "botocore"),
("'urllib3.contrib.pyopenssl' module is deprecated and will be", "requests_toolbelt"),
("zmq.eventloop.ioloop is deprecated in pyzmq 17.", "jupyter_client"),
}
KNOWN_COMMON_DEPRECATED_MESSAGES: set[str] = {<commi... |
<vulnerable_code> mock_hook.search(client_ids=client_ids, query=query, page_size=2)
for i, client_id in enumerate(client_ids):
name, args, kwargs = service.search.mock_calls[i]
assert kwargs["request"].customer_id == client_id
assert kwargs["request"].query == query
... |
<vulnerable_code> self.assertIsNone(is_absolute_uri('wrong'))
self.assertIsNone(is_absolute_uri('http://[:1]:38432/path'))
self.assertIsNone(is_absolute_uri('http://[abcd:efgh::1]/'))<commit_title>[PATCH 1/2] Add check of performance of ipv6 check<commit_description><fixed_code>
self.asse... |
<vulnerable_code>)
# IPv6address
IPv6address = r"([A-Fa-f0-9:]+:+)+[A-Fa-f0-9]+"
# IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
IPvFuture = r"v %(HEXDIG)s+ \. (?: %(unreserved)s | %(sub_delims)s | : )+" % locals()<commit_title>[PATCH 1/2] Add check of performance of ipv6 check<commit_descr... |
<vulnerable_code>import oauthlib
from oauthlib.uri_validate import is_absolute_uri
from tests.unittest import TestCase
class UriValidateTest(TestCase):
def test_is_absolute_uri(self):
self.assertIsNotNone(is_absolute_uri('schema://example.com/path'))
self.assertIsNotNone(is_absolute_uri('https://... |
<vulnerable_code> if(exception->severity != UndefinedException) goto FINISH_UNL;
if(magic_info->name == (char *) NULL) goto FINISH_UNL;
(void) CopyMagickMemory(clone_info->magick,magic_info->name,MagickPathExtent);
/* Read nested image */
/*FormatString(clone_info->filename,"%s:%s",magic_info->n... |
<vulnerable_code> /* Check the CMAC */
fixed_length = at91_aes_roundup(data_length);
cmac = (const unsigned int *)((char *)data + fixed_length);
if (memcmp(cmac, computed_cmac, AT91_AES_BLOCK_SIZE_BYTE))
goto exit;
}
<commit_title>[PATCH] driver: secure: use consttime_memequal for memory comparison<commit_de... |
<vulnerable_code> status;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",ima... |
<vulnerable_code> clut_image=RemoveFirstImageFromList(images);
if (clut_image == (Image *) NULL)
{
status=MagickFalse;
break;
}
}
if (LocaleCompare("compare",option+1) == 0)
{
const char
... |
<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 TSRMLS_DC)
{
char *ksep, *vsep, *val;
size_t klen, vlen;
/* FIXME: string-size_t */
unsigned int new_vlen;
return 0;
}
vsep = memchr(var->ptr, '&', var->end -... |
<vulnerable_code>
def testInvalidSeqRaiseErrorForFractionalMaxPoolGrad(self):
with self.assertRaises(errors.InvalidArgumentError):
with self.cached_session() as _:
overlapping = True
orig_input = constant_op.constant(
.453409232, shape=[1, 7, 13, 1], dtype=dtypes.float32)
... |
<vulnerable_code> err = device_register(&bus->dev);
if (err) {
pr_err("mii_bus %s failed to register\n", bus->id);
put_device(&bus->dev);
return -EINVAL;
}
<commit_title>[PATCH] mdio_bus: Fix use-after-free on device_register fails<commit_description>KASAN has found use-after-free in fixed_mdio_bus_init,
commit... |
<vulnerable_code> * @param {Request} request
* @param {...string} types
*/
export function is_content_type(request, ...types) {
const type = request.headers.get('content-type')?.split(';', 1)[0].trim() ?? '';
return types.includes(type);
}
/**<commit_title>[PATCH] Merge pull request from GHSA-gv7g-x59x-wf8f<commi... |
<vulnerable_code> const content_types = [
'application/x-www-form-urlencoded',
'multipart/form-data',
'text/plain'
];
const methods = ['POST', 'PUT', 'PATCH', 'DELETE'];
for (const method of methods) {<commit_title>[PATCH] Merge pull request from GHSA-gv7g-x59x-wf8f<commit_description>* fix: do a case-i... |
<vulnerable_code> cond_resched();
}
out_put:
fput_light(sock->file, fput_needed);
if (err == 0)
return datagrams;
if (datagrams != 0) {
/*
* We may return less entries than requested (vlen) if the
* sock is non block and there aren't enough datagrams...
*/
if (err != -EAGAIN) {
/*
* ... or... |
<vulnerable_code> * Module dependencies.
*/
var utils = require('./utils');
var exec = require('child_process').exec;
var fs = require('fs');
var tmpdir = require('os').tmpdir(); // let the os take care of removing zombie tmp files
var uuid = require('uuid');
var path = require('path');
var { glob, } = require("glob")... |
<vulnerable_code>describe('process', function(){
it('should return the string "node-tesseract"', function(done){
var testImage = "\"" + __dirname + '/test.png' + "\"";
tesseract.process(testImage, function(err, text) {
text.trim().should.equal('node-tesseract');
done();
});
done();
})... |
<vulnerable_code>import csv
import wireguard as wg
env = Environment(loader=FileSystemLoader('templates'),
extensions=['jinja2.ext.loopcontrols'])
with open('/srv/templates/error_http.html', 'r') as f:
twisted.web.resource.ErrorPage.template = f.read()
return Resource.getChild(self, name... |
<vulnerable_code> if (length != 0)
{
if (length > GetBlobSize(image))
ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
chunk=(unsigned char *) AcquireQuantumMemory(length,sizeof(*chunk));
if (chunk == (unsigned char *) NULL)<commit_title>[PATCH] https://... |
<vulnerable_code> /* destroy any largepage mappings for dirty tracking */
}
if (!npages) {
struct kvm_memory_slot *slot;
r = -ENOMEM;
old_memslots = kvm->memslots;
rcu_assign_pointer(kvm->memslots, slots);
synchronize_srcu_expedited(&kvm->srcu);
/* From this point no new shadow pages pointing to a dele... |
<vulnerable_code> * @returns {string} The escaped argument.
*/
function escapeArgCmd(arg, interpolation, quoted) {
let result = arg.replace(/\u0000/g, "").replace(/\n/g, " ");
if (interpolation) {
result = result<commit_title>[PATCH] Update escaping of whitespace for CMD<commit_description>* Add item to fuzz ... |
<vulnerable_code> *
* As Math.random() is cryptographically not safe to use
*/
var secureRandom = function () {
// Native crypto module on NodeJS environment
try {
// Crypto from global object
var crypto = global.crypto;
// Create a random float num... |
<vulnerable_code> root_path = file_path = unquote(file_or_directory)
if __file_uri__:
unquoted_file_uri = unquote(__file_uri__)
file_path = path.join(
file_or_directory, unquoted_file_uri.lstrip("/")
)
pure_file_path = PurePath(file_path)
... |
<vulnerable_code>
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ServerSo... |
<vulnerable_code> )
try:
result = subprocess.Popen(
"asciidoctor {} -o {}".format(reportraw, reporthtml)
)
if str(result) == "32512":
msg = "asciidoctor not found. html cannot be generated."
QtGui.QMessageBox.informa... |
<vulnerable_code>
proxy = flask.Flask(__name__)
proxy.debug = False
runner = None
def setRunner(r):
global runner
runner = r
@proxy.route('/init', methods=['POST'])
def init():
message = flask.request.get_json(force=True, silent=True)
if message and not isinstance(message, dict):
flask.abort(... |
<vulnerable_code> CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
return false;
}
CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
... |
<vulnerable_code> return err;
}
int ocfs2_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
* called like this: dio->get_blocks(dio->inode, fs_startblk,
* fs_count, map_bh, dio->rw == WRITE);
*/
static int ocfs2_dio_get_block(struct inode *inode, sector_t iblock... |
<vulnerable_code> 'application/octet-stream',
size=attached.size,
)
att.save()
if attached.size < max_email_attachment_size:<commit_title>[PATCH] Add `att.full_clean()` before saving<commit_description>Fix issue https://github.com/django-helpdesk/djang... |
<vulnerable_code> challenged_id = mysql.escape(challenged_id);
latitude = mysql.escape(latitude);
longitude = mysql.escape(longitude);
pic_path = mysql.escape(pic_path.replace("public/", ""));
var conn = mysql.createConnection(conn_params);
<commit_title>[PATCH] Fuck node<commit_description><fixed_code>
cha... |
<vulnerable_code> chunk=(unsigned char *) AcquireQuantumMemory(length,sizeof(*chunk));
if (chunk == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
for (i=0; i < (ssize_t) length; i++)
{
jng_width=(png_uint_32)mng_get_long... |
<vulnerable_code> }
vs_ie = (struct ieee_types_header *)vendor_ie;
memcpy(ie->ie_buffer + le16_to_cpu(ie->ie_length),
vs_ie, vs_ie->len + 2);
le16_unaligned_add_cpu(&ie->ie_length, vs_ie->len + 2);<commit_title>[PATCH] mwifiex: Fix three heap overflow at parsing element in<commit_description><fixed_cod... |
<vulnerable_code>
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (rate_ie) {
memcpy(bss_cfg->rates, rate_ie + 1, rate_ie->len);
rate_len = rate_ie->len;
}
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES,
params->beacon.tail,
params->beacon.tail_len);
if (ra... |
<vulnerable_code> load_raw = &CLASS sony_arw_load_raw;
data_offset = get4() + base;
ifd++;
break;
}
#ifdef LIBRAW_LIBRARY_BUILD
break;
case 50454: /* Sinar tag */
case 50455:
if (len > 2560000 || !(cbuf = (char *)malloc(len)))
break;
#ifndef LIBRAW_LIBRAR... |
<vulnerable_code>
static bool dump_fd_info(const char *dest_filename, char *source_filename, int source_base_ofs, uid_t uid, gid_t gid)
{
FILE *fp = fopen(dest_filename, "w");
if (!fp)
return false;
<commit_title>[PATCH] ccpp: open file for dump_fd_info with O_EXCL<commit_description>To avoid possible r... |
<vulnerable_code> * representations of JavaBeans using the {@link XMLEncoder} and
* {@link XMLDecoder} classes. In this case, it handles representations having
* the following media type: {@link MediaType#APPLICATION_JAVA_OBJECT_XML}
* ("application/x-java-serialized-object+xml").
*
* SECURITY WARNING: The usage ... |
<vulnerable_code> uint32_t tag = track->tag;
if (track->mode == MODE_MOV) {
if (track->timescale > UINT16_MAX) {
if (mov_get_lpcm_flags(track->par->codec_id))
tag = AV_RL32("lpcm");
version = 2;<commit_title>[PATCH] avformat/movenc: Write version 2 of audio atom i... |
<vulnerable_code>)
from nautobot.core.utils.lookup import get_model_from_name
from nautobot.extras.choices import ObjectChangeActionChoices, ObjectChangeEventContextChoices
from nautobot.extras.context_managers import change_logging, JobChangeContext, JobHookChangeContext
from nautobot.extras.forms import JobForm
from ... |
<vulnerable_code> self.assertTrue(profiling_result.exists())
profiling_result.unlink()
class JobFileUploadTest(TransactionTestCase):
"""Test a job that uploads/deletes files."""<commit_title>[PATCH] fix jobs not firing webhooks (#4836)<commit_description><fixed_code>
self.assertTrue(profili... |
<vulnerable_code># See the License for the specific language governing permissions and
# limitations under the License.
from synapse.api.constants import EventContentFields
from synapse.api.room_versions import RoomVersions
from synapse.events import make_event_from_dict
)
from synapse.util.frozenutils import freeze
... |
<vulnerable_code>import os
import base64
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_bytes
from ansible.module_utils.six import string_types
from ansible.module_utils.parsing.convert_bool import boolean
try:
if self._play_context.check_mode:
re... |
<vulnerable_code>
def _ensure_abs(self, path):
if not os.path.isabs(path) and self.cwd is not None:
path = os.path.normpath(os.path.join(self.cwd, path))
return path
def put_file(self, in_path, out_path):<commit_title>[PATCH] fixed fetch traversal from slurp<commit_description>* ign... |
<vulnerable_code><commit_title>[PATCH] fixed fetch traversal from slurp<commit_description>* ignore slurp result
* also fixed naming when source is relative
* also fixed bug in local connection plugin
* add tests with fake slurp
* moved existing role tests into runme.sh
* normalized on action exceps
* moved... |
<vulnerable_code>
#ifndef EMULATOR
/// Return context from user isr processing
void svc_busr_return(void) {
__asm__ __volatile__("svc %0" ::"i"(SVC_BUSR_RET) : "memory");
}
void svhandler_flash_erase_sector(void) {
uint32_t sector = _param_1;
// Do not allow firmware to erase bootstrap or bootloader sectors.
... |
<vulnerable_code> stream.ReadUI32(m_Reserved3);
stream.ReadUI16(m_FrameCount);
char compressor_name[33];
compressor_name[32] = 0;
stream.Read(compressor_name, 32);
int name_length = compressor_name[0];
if (name_length < 32) {
compressor_name[name_length+1] = 0; // force null terminat... |
<vulnerable_code> [],
{},
null,
[1,"2",3,"4",5,6],
[1,{},3],
[1,2,undefined],<commit_title>[PATCH] include infinities and NaNs in invalid data test<commit_description><fixed_code>
[],
{},
null,
[1,2,3,NaN,4,5,6],
[+Infinity,3,4,5],
[1,2,3,4,-Infi... |
<vulnerable_code> return;
}
cbc_ext_opcode_t context_opcode = CBC_EXT_OBJ_INIT_CONTEXT_CREATE;
if (flags & PARSER_PATTERN_HAS_REST_ELEMENT)
parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);
}
/* Checked at the end because there might be syntax errors before. */
JERRY... |
<vulnerable_code><commit_title>[PATCH] Check rest initializer existence after pattern finalization<commit_description>Since the scanner info is not present for invalid destructuring patterns we can only ensure the existence of the rest element after the pattern is finalized.
This patch fixes #4928.
JerryScript-DCO-1.0... |
<vulnerable_code> mft[callee_id][caller_id].disable_ack) {
mft[callee_id][caller_id].disable_req++;
mayfly_pend(caller_id, callee_id);
}
}
if (!mfp[callee_id]) {
return;
}
mfp[callee_id] = 1U;
/* iterate through each caller queue to this callee_id */
caller_id = MAYFLY_CALLER_COUNT;
* proces... |
<vulnerable_code> if status != '':
link_vals += '&status=' + str(status)
if ctype != '':
link_vals += '&ctype=' + str(status)
if search != '':
link_vals += '&search=' + str(search)
if len(check_senders) > 0:<commit_title>[PATCH] Fixed: The filter Type gets lost on pages > 1 (#780)... |
<vulnerable_code> });
});
});
<commit_title>[PATCH] Add test.<commit_description><fixed_code>
});
});
describe('existing session, but not passing a callback argument', function() {
var passport = new Passport();
passport.serializeUser(function(user, done) {
do... |
<vulnerable_code>import os
from aim.web.api.utils import APIRouter # wrapper for fastapi.APIRouter
from fastapi.responses import FileResponse
statics_router = APIRouter()
@statics_router.get('/static-files/{path:path}/')
async def serve_static_files(path):
from aim import web
static_file_name = os.path.join... |
<vulnerable_code> validators=[
validators.data_required(),
validators.length(max=256, message=_('Username too long.')),
],
)
fullname = StringField(
validators=[
validators.optional(),
validators.length(max=256, message=_('Fullname too long.... |
<vulnerable_code>to change password ans refresh it's repository view.
"""
import logging
import re
import cherrypy
from wtforms.fields import HiddenField, PasswordField, StringField, SubmitField
from wtforms.fields.html5 import EmailField
from rdiffweb.controller import Controller, flash
from rdiffweb.controller.for... |
<vulnerable_code>from unittest.mock import ANY, MagicMock
import cherrypy
import rdiffweb.test
from rdiffweb.core.model import UserObject
self.assertInBody("User account removed.")
self.assertNotInBody("test2")
def test_edit_fullname(self):
# Given an existing user
# When updating... |
<vulnerable_code>from unittest.mock import MagicMock
import cherrypy
import rdiffweb.test
from rdiffweb.core.model import RepoObject, UserObject
self.assertIsNotNone(user)
self.assertEqual("test@test.com", user.email)
def test_change_fullname(self):
# Given an authenticated user
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.