instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int iwgif_read_color_table(struct iwgifrcontext *rctx, struct iw_palette *ct)
{
int i;
if(ct->num_entries<1) return 1;
if(!iwgif_read(rctx,rctx->rbuf,3*ct->num_entries)) return 0;
for(i=0;i<ct->num_entries;i++) {
ct->entry[i].r = rctx->rbuf[3*i+0];
ct->entry[i].g = rctx->rbuf[3*i+1];
ct->entry[i... | 0 | 23,001 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: exsltDateCurrent (void)
{
struct tm localTm, gmTm;
time_t secs;
int local_s, gm_s;
exsltDateValPtr ret;
ret = exsltDateCreateDate(XS_DATETIME);
if (ret == NULL)
return NULL;
/* get current time */
secs = time(NULL);
#if HAVE_LOCALTIME_R
localtime_r(&secs, &localTm)... | 0 | 27,615 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int mxf_absolute_bodysid_offset(MXFContext *mxf, int body_sid, int64_t offset, int64_t *offset_out, MXFPartition **partition_out)
{
MXFPartition *last_p = NULL;
int a, b, m, m0;
if (offset < 0)
return AVERROR(EINVAL);
a = -1;
b = mxf->partitions_count;
while (b - a > 1) {... | 0 | 5,693 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const String& charset)
{
requestPreload(type, request, charset);
}
Commit Message: Enforce SVG image security rules
SVG images have unique security rules that prevent them from loading
any external resources. This patch enforces these... | 0 | 2,172 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded(const VisiblePosition& endOfCurrentParagraph, Position& start, Position& end)
{
start = startOfParagraph(endOfCurrentParagraph).deepEquivalent();
end = endOfCurrentParagraph.deepEquivalent();
document().updateStyleIfNeeded();
... | 0 | 25,133 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int TraceLineTo(FT_Vector *to,DrawInfo *draw_info)
{
AffineMatrix
affine;
char
path[MagickPathExtent];
affine=draw_info->affine;
(void) FormatLocaleString(path,MagickPathExtent,"L%g,%g",affine.tx+to->x/64.0,
affine.ty-to->y/64.0);
(void) ConcatenateString(&draw_info->primitive,path)... | 0 | 6,698 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderView::DidInitiatePaint() {
pepper_delegate_.ViewInitiatedPaint();
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93596 0039d316-1c4b-4281-b951-d872f2087c98
C... | 0 | 20,979 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Document* Document::ParentDocument() const {
if (!frame_)
return 0;
Frame* parent = frame_->Tree().Parent();
if (!parent || !parent->IsLocalFrame())
return 0;
return ToLocalFrame(parent)->GetDocument();
}
Commit Message: Inherit CSP when we inherit the security origin
This prevents attacks that ... | 0 | 3,972 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8TestObject::MeasureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_measureAsVoidMethod");
ExecutionContext* execution_context_for_measurement = CurrentExecutionContext(info.GetIsolate());
... | 0 | 13,059 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SPL_METHOD(SplPriorityQueue, insert)
{
zval *data, *priority, *elem;
spl_heap_object *intern;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &data, &priority) == FAILURE) {
return;
}
intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (intern->heap->flags & SPL_... | 0 | 12,325 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int sb_min_blocksize(struct super_block *sb, int size)
{
int minsize = bdev_logical_block_size(sb->s_bdev);
if (size < minsize)
size = minsize;
return sb_set_blocksize(sb, size);
}
Commit Message: ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pi... | 0 | 17,613 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static long __video_do_ioctl(struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *vfd = video_devdata(file);
const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
void *fh = file->private_data;
struct v4l2_format f_copy;
long ret = -EINVAL;
if (ops == NULL) {
printk(KERN_WARNING "videode... | 0 | 22,768 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofputil_decode_meter_request(const struct ofp_header *oh, uint32_t *meter_id)
{
const struct ofp13_meter_multipart_request *omr = ofpmsg_body(oh);
*meter_id = ntohl(omr->meter_id);
}
Commit Message: ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the... | 0 | 18,384 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void CompareCharArraysWithHexError(
const string& description,
const char* actual,
const int actual_len,
const char* expected,
const int expected_len) {
const int min_len = min(actual_len, expected_len);
const int max_len = max(actual_len, expected_len);
scoped_array<bool> marks(new bool... | 0 | 2,723 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void __init check_numabalancing_enable(void)
{
bool numabalancing_default = false;
if (IS_ENABLED(CONFIG_NUMA_BALANCING_DEFAULT_ENABLED))
numabalancing_default = true;
/* Parsed by setup_numabalancing. override == 1 enables, -1 disables */
if (numabalancing_override)
set_numabalancing_state(numab... | 0 | 1,992 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void append_cs_return(cs_entry *ptr)
{
unsigned short cr;
int i;
byte *p, *q, *data, *new_data;
assert(ptr != NULL && ptr->valid && ptr->used);
/* decrypt the cs data to t1_buf_array, append CS_RETURN */
p = (byte *) t1_buf_array;
data = ptr->data + 4;
cr = 4330;
for (i... | 0 | 26,855 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void ohci_async_complete_packet(USBPort *port, USBPacket *packet)
{
OHCIState *ohci = container_of(packet, OHCIState, usb_packet);
trace_usb_ohci_async_complete();
ohci->async_complete = true;
ohci_process_lists(ohci, 1);
}
Commit Message:
CWE ID: CWE-835 | 0 | 22,749 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SWFInput_readBits(SWFInput input, int number)
{
int ret = input->buffer;
if ( number == input->bufbits )
{
input->bufbits = 0;
input->buffer = 0;
return ret;
}
if ( number > input->bufbits )
{
number -= input->bufbits;
while( number > 8 )
{
ret <<= 8;
ret += SWFInput_getChar(input);
n... | 0 | 25,915 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofputil_decode_queue_stats_request(const struct ofp_header *request,
struct ofputil_queue_stats_request *oqsr)
{
switch ((enum ofp_version)request->version) {
case OFP16_VERSION:
case OFP15_VERSION:
case OFP14_VERSION:
case OFP13_VERSION:
case OFP12_VERSI... | 0 | 25,510 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __init gre_offload_init(void)
{
return inet_add_offload(&gre_offload, IPPROTO_GRE);
}
Commit Message: tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Support... | 0 | 15,871 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
struct xdr_stream *xdr,
const struct nfs4_lookup_root_arg *args)
{
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequence(xdr, &args->seq_args, &... | 0 | 1,256 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BluetoothDeviceChromeOS::Release() {
DCHECK(agent_.get());
DCHECK(pairing_delegate_);
VLOG(1) << object_path_.value() << ": Release";
pincode_callback_.Reset();
passkey_callback_.Reset();
confirmation_callback_.Reset();
UnregisterAgent();
}
Commit Message: Refactor to support default Bluetooth... | 1 | 9,151 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
{
const struct cred *old_cred;
struct cred *override_cred;
struct path path;
struct inode *inode;
int res;
unsigned int lookup_flags = LOOKUP_FOLLOW;
if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
return -EINVAL;
... | 0 | 28,933 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int verify_vc_kbmode(int fd) {
int curr_mode;
/*
* Make sure we only adjust consoles in K_XLATE or K_UNICODE mode.
* Otherwise we would (likely) interfere with X11's processing of the
* key events.
*
* http://lists.freedesktop.org/archives/system... | 1 | 29,571 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static apr_status_t fill_buffer(h2_stream *stream, apr_size_t amount)
{
conn_rec *c = stream->session->c;
apr_bucket *b;
apr_status_t status;
if (!stream->output) {
return APR_EOF;
}
status = h2_beam_receive(stream->output, stream->out_buffer,
APR... | 0 | 3,225 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8Console::inspectCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
inspectImpl(info, false);
}
Commit Message: [DevTools] Copy objects from debugger context to inspected context properly.
BUG=637594
Review-Url: https://codereview.chromium.org/2253643002
Cr-Commit-Position: refs/heads/master... | 0 | 27,916 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool RenderMessageFilter::CheckPreparsedJsCachingEnabled() const {
static bool checked = false;
static bool result = false;
if (!checked) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
result = command_line.HasSwitch(switches::kEnablePreparsedJsCaching);
checked = true;
... | 0 | 14,615 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct hash_ctx *ctx = ask->private;
unsigned ds = crypto_ahash_digestsize(crypto_ahash_reqtfm(&ctx->req));
int err;
if (len > ds)
len = ds;
else if... | 0 | 18,095 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name,
const std::string& page_url,
int flags) {
return RunExtensionSubtestWithArgAndFlags(extension_name, page_url, nullptr,
... | 0 | 15,248 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void PeopleHandler::InitializeSyncBlocker() {
if (!web_ui())
return;
WebContents* web_contents = web_ui()->GetWebContents();
if (web_contents) {
ProfileSyncService* service = GetSyncService();
const GURL current_url = web_contents->GetVisibleURL();
if (service &&
current_url == chrom... | 0 | 28,936 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Element::detach(const AttachContext& context)
{
WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
unregisterNamedFlowContentNode();
cancelFocusAppearanceUpdate();
if (hasRareData()) {
ElementRareData* data = elementRareData();
data->setPseudoElement(BEFORE, ... | 0 | 22,374 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: decode_encoded_header_info(struct archive_read *a, struct _7z_stream_info *si)
{
struct _7zip *zip = (struct _7zip *)a->format->data;
errno = 0;
if (read_StreamsInfo(a, si) < 0) {
if (errno == ENOMEM)
archive_set_error(&a->archive, -1,
"Couldn't allocate memory");
else
archive_set_error(&a->a... | 0 | 10,187 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MockNetworkLayer::~MockNetworkLayer() {}
Commit Message: Replace fixed string uses of AddHeaderFromString
Uses of AddHeaderFromString() with a static string may as well be
replaced with SetHeader(). Do so.
BUG=None
Review-Url: https://codereview.chromium.org/2236933005
Cr-Commit-Position: refs/heads/master@{#... | 0 | 18,418 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FileSystemOperation::Remove(const GURL& path_url, bool recursive,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationRemove));
base::PlatformFileError result = SetUpFileSystemPath(
path_url, &src_path_, &src_util_, PATH_FOR_WRITE);
if (res... | 0 | 23,101 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool flag)
{
Element* element = this;
while ((element = parentCrossingFrameBoundaries(element)))
element->setContainsFullScreenElement(flag);
}
Commit Message: Set Attr.ownerDocument in Element#setAttributeNode()
Attr o... | 0 | 5,402 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void nft_unregister_expr(struct nft_expr_type *type)
{
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_del_rcu(&type->list);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
}
Commit Message: netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different... | 0 | 15,564 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool ExecuteDefaultParagraphSeparator(LocalFrame& frame,
Event*,
EditorCommandSource,
const String& value) {
if (DeprecatedEqualIgnoringCase(value, "div"))
frame.GetE... | 0 | 10,361 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: String Document::cookie(ExceptionState& exception_state) const {
if (GetSettings() && !GetSettings()->GetCookieEnabled())
return String();
if (!GetSecurityOrigin()->CanAccessCookies()) {
if (IsSandboxed(kSandboxOrigin))
exception_state.ThrowSecurityError(
"The document is sandboxed a... | 0 | 8,444 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofputil_port_stats_from_ofp13(struct ofputil_port_stats *ops,
const struct ofp13_port_stats *ps13)
{
enum ofperr error = ofputil_port_stats_from_ofp11(ops, &ps13->ps);
if (!error) {
ops->duration_sec = ntohl(ps13->duration_sec);
ops->duration_nsec = ntohl(ps13... | 0 | 2,403 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int dvico_bluebird_xc2028_callback(void *ptr, int component,
int command, int arg)
{
struct dvb_usb_adapter *adap = ptr;
struct dvb_usb_device *d = adap->dev;
switch (command) {
case XC2028_TUNER_RESET:
deb_info("%s: XC2028_TUNER_RESET %d\n", __func__, arg);
cxusb_bluebird_gpio_pulse(d, 0x0... | 0 | 12,762 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int netlink_change_ngroups(struct sock *sk, unsigned int groups)
{
int err;
netlink_table_grab();
err = __netlink_change_ngroups(sk, groups);
netlink_table_ungrab();
return err;
}
Commit Message: af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially... | 0 | 3,999 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sparse_extract_file (int fd, struct tar_stat_info *st, off_t *size)
{
bool rc = true;
struct tar_sparse_file file;
size_t i;
if (!tar_sparse_init (&file))
return dump_status_not_implemented;
file.stat_info = st;
file.fd = fd;
file.seekable = lseek (fd, 0, SEEK_SET) == 0;
file.offset = 0;
... | 0 | 19,010 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderBuffer::RenderBuffer(GLES2DecoderImpl* decoder)
: decoder_(decoder),
id_(0) {
}
Commit Message: Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7796016
git-svn-id: svn://svn.chromium.org/chrome/trun... | 0 | 8,202 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: CorePageLoadMetricsObserver::~CorePageLoadMetricsObserver() {}
Commit Message: Remove clock resolution page load histograms.
These were temporary metrics intended to understand whether high/low
resolution clocks adversely impact page load metrics. After collecting a few
months of data it was determined that clo... | 0 | 5,668 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t NuPlayer::GenericSource::setBuffers(
bool audio, Vector<MediaBuffer *> &buffers) {
if (mIsSecure && !audio) {
return mVideoTrack.mSource->setBuffers(buffers);
}
return INVALID_OPERATION;
}
Commit Message: MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4... | 1 | 8,218 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LayerTreeCoordinator::didInstallPageOverlay()
{
createPageOverlayLayer();
scheduleLayerFlush();
}
Commit Message: [WK2] LayerTreeCoordinator should release unused UpdatedAtlases
https://bugs.webkit.org/show_bug.cgi?id=95072
Reviewed by Jocelyn Turcotte.
Release graphic buffers that haven't been us... | 0 | 1,894 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ResourceLoader* ResourceDispatcherHostImpl::GetLoader(
const GlobalRequestID& id) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
LoaderMap::const_iterator i = pending_loaders_.find(id);
if (i == pending_loaders_.end())
return NULL;
return i->second.get();
}
Commit Message: Make ... | 0 | 866 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TestDelegate() : last_used_id_(0) {}
Commit Message: Pepper: Access PepperMediaDeviceManager through a WeakPtr
Its lifetime is scoped to the RenderFrame, and it might go away before the
hosts that refer to it.
BUG=423030
Review URL: https://codereview.chromium.org/653243003
Cr-Commit-Position: refs/heads/... | 0 | 14,896 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: win32_thread_specific_data(void *private_data)
{
return((DWORD) thread_specific_data(private_data));
}
Commit Message: Fix handling of parameter-entity references
There were two bugs where parameter-entity references could lead to an
unexpected change of the input buffer in xmlParseNameComplex and
xmlDictLo... | 0 | 24,790 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void *atomic_thread(void *context) {
struct atomic_test_s32_s *at = (struct atomic_test_s32_s *)context;
for (int i = 0; i < at->max_val; i++) {
usleep(1);
atomic_inc_prefix_s32(&at->data[i]);
}
return NULL;
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT ... | 1 | 8,189 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: OVS_REQUIRES(ofproto_mutex)
{
struct rule *old_rule = rule_collection_n(&ofm->old_rules)
? rule_collection_rules(&ofm->old_rules)[0] : NULL;
struct rule *new_rule = rule_collection_rules(&ofm->new_rules)[0];
replace_rule_revert(ofproto, old_rule, new_rule);
}
Commit Message: ofproto: Fix... | 0 | 1,533 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FrameSelection::SetUseSecureKeyboardEntry(bool enable) {
if (enable)
EnableSecureTextInput();
else
DisableSecureTextInput();
}
Commit Message: Move SelectionTemplate::is_handle_visible_ to FrameSelection
This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate|
since ha... | 0 | 29,921 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: su_main (int argc, char **argv, int mode)
{
int optc;
const char *new_user = DEFAULT_USER, *runuser_user = NULL;
char *command = NULL;
int request_same_session = 0;
char *shell = NULL;
struct passwd *pw;
struct passwd pw_copy;
gid_t *groups = NULL;
size_t ngroups = 0;
bool use_supp = false;
... | 0 | 2,920 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data,
gfx::NativePixmapHandle* out) {
#if defined(OS_LINUX)
mojo::ArrayDataView<mojo::ScopedHandle> handles_data_view;
data.GetFdsDataView(&handles_data_view);
for (size_t i = 0; i < handles_data_vie... | 0 | 7,603 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AutofillDialogViews::DetailsContainerView::DetailsContainerView(
const base::Closure& callback)
: bounds_changed_callback_(callback),
ignore_layouts_(false) {}
Commit Message: Clear out some minor TODOs.
BUG=none
Review URL: https://codereview.chromium.org/1047063002
Cr-Commit-Position: refs/hea... | 0 | 20,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void jit_fill_hole(void *area, unsigned int size)
{
/* fill whole space with int3 instructions */
memset(area, 0xcc, size);
}
Commit Message: x86: bpf_jit: fix compilation of large bpf programs
x86 has variable length encoding. x86 JIT compiler is trying
to pick the shortest encoding for given bpf inst... | 0 | 23,275 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __net_init tcp_sk_init(struct net *net)
{
return inet_ctl_sock_create(&net->ipv4.tcp_sock,
PF_INET, SOCK_RAW, IPPROTO_TCP, net);
}
Commit Message: inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_... | 0 | 4,736 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pair_decode(char *str, float8 *x, float8 *y, char **s)
{
int has_delim;
char *cp;
if (!PointerIsValid(str))
return FALSE;
while (isspace((unsigned char) *str))
str++;
if ((has_delim = (*str == LDELIM)))
str++;
while (isspace((unsigned char) *str))
str++;
*x = strtod(str, &cp);
if (cp <= st... | 0 | 29,592 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LocalFrameClientImpl::DispatchWillSubmitForm(HTMLFormElement* form) {
if (web_frame_->Client())
web_frame_->Client()->WillSubmitForm(WebFormElement(form));
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be abl... | 0 | 29,432 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: v8::Handle<v8::Object> V8TestEventTarget::wrapSlow(PassRefPtr<TestEventTarget> impl, v8::Isolate* isolate)
{
v8::Handle<v8::Object> wrapper;
V8Proxy* proxy = 0;
wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl.get());
if (UNLIKELY(wrapper.IsEmpty()))
return wrapper;
v8::... | 0 | 25,888 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool PTSTimeDeltaEstablished() const {
return mFirstPTSValid;
}
Commit Message: Check section size when verifying CRC
Bug: 28333006
Change-Id: Ief7a2da848face78f0edde21e2f2009316076679
CWE ID: CWE-119 | 0 | 15,533 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rend_consider_descriptor_republication(void)
{
int i;
rend_service_t *service;
if (!consider_republishing_rend_descriptors)
return;
consider_republishing_rend_descriptors = 0;
if (!get_options()->PublishHidServDescriptors)
return;
for (i=0; i < smartlist_len(rend_service_list); ++i) {
s... | 0 | 16,976 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void dump_cpu_task(int cpu)
{
pr_info("Task dump for CPU %d:\n", cpu);
sched_show_task(cpu_curr(cpu));
}
Commit Message: Merge branch 'stacking-fixes' (vfs stacking fixes from Jann)
Merge filesystem stacking fixes from Jann Horn.
* emailed patches from Jann Horn <jannh@google.com>:
sched: panic on corrupte... | 0 | 21,986 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PasswordStoreLoginsChangedObserver::~PasswordStoreLoginsChangedObserver() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
gi... | 0 | 10,655 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool unhash_ol_stateid(struct nfs4_ol_stateid *stp)
{
struct nfs4_file *fp = stp->st_stid.sc_file;
lockdep_assert_held(&stp->st_stateowner->so_client->cl_lock);
if (list_empty(&stp->st_perfile))
return false;
spin_lock(&fp->fi_lock);
list_del_init(&stp->st_perfile);
spin_unlock(&fp->fi_lock);
l... | 0 | 29,599 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int em_popf(struct x86_emulate_ctxt *ctxt)
{
ctxt->dst.type = OP_REG;
ctxt->dst.addr.reg = &ctxt->eflags;
ctxt->dst.bytes = ctxt->op_bytes;
return emulate_popf(ctxt, &ctxt->dst.val, ctxt->op_bytes);
}
Commit Message: KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit... | 0 | 4,956 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void *find_pmu_context(int ctxn)
{
struct pmu *pmu;
if (ctxn < 0)
return NULL;
list_for_each_entry(pmu, &pmus, entry) {
if (pmu->task_ctx_nr == ctxn)
return pmu->pmu_cpu_context;
}
return NULL;
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi... | 0 | 10,175 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void lock_mutex(pthread_mutex_t *l)
{
int ret;
if ((ret = pthread_mutex_lock(l)) != 0) {
fprintf(stderr, "pthread_mutex_lock returned:%d %s\n", ret, strerror(ret));
exit(1);
}
}
Commit Message: CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the co... | 0 | 17,101 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: recv_rexec_state(int fd, Buffer *conf)
{
Buffer m;
char *cp;
u_int len;
debug3("%s: entering fd = %d", __func__, fd);
buffer_init(&m);
if (ssh_msg_recv(fd, &m) == -1)
fatal("%s: ssh_msg_recv failed", __func__);
if (buffer_get_char(&m) != 0)
fatal("%s: rexec version mismatch", __func__);
cp = buffe... | 0 | 19,571 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_Err avcc_Read(GF_Box *s, GF_BitStream *bs)
{
u32 i, count;
GF_AVCConfigurationBox *ptr = (GF_AVCConfigurationBox *)s;
if (ptr->config) gf_odf_avc_cfg_del(ptr->config);
ptr->config = gf_odf_avc_cfg_new();
ptr->config->configurationVersion = gf_bs_read_u8(bs);
ptr->config->AVCProfileIndication = gf_bs_rea... | 0 | 3,580 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WORD32 ihevcd_calc_poc(codec_t *ps_codec, nal_header_t *ps_nal, WORD8 i1_log2_max_poc_lsb, WORD32 i2_poc_lsb)
{
WORD32 i4_abs_poc, i4_poc_msb;
WORD32 max_poc_lsb;
WORD8 i1_nal_unit_type = ps_nal->i1_nal_unit_type;
max_poc_lsb = (1 << i1_log2_max_poc_lsb);
if((!ps_codec->i4_first_pic_done) && (!p... | 0 | 2,297 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LargeObjectPage::sweep() {
heapObjectHeader()->unmark();
arena()->getThreadState()->increaseMarkedObjectSize(size());
}
Commit Message: Call HeapObjectHeader::checkHeader solely for its side-effect.
This requires changing its signature. This is a preliminary stage to making it
private.
BUG=633030
Rev... | 0 | 9,518 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: decode_fh(__be32 *p, struct svc_fh *fhp)
{
unsigned int size;
fh_init(fhp, NFS3_FHSIZE);
size = ntohl(*p++);
if (size > NFS3_FHSIZE)
return NULL;
memcpy(&fhp->fh_handle.fh_base, p, size);
fhp->fh_handle.fh_size = size;
return p + XDR_QUADLEN(size);
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux... | 0 | 18,803 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned CLASS ph1_bithuff (int nbits, ushort *huff)
{
static UINT64 bitbuf=0;
static int vbits=0;
unsigned c;
if (nbits == -1)
return bitbuf = vbits = 0;
if (nbits == 0) return 0;
if (vbits < nbits) {
bitbuf = bitbuf << 32 | get4();
vbits += 32;
}
c = bitbuf << (64-vbits) >> (64-nbit... | 0 | 1,186 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) {
if (parser == NULL)
return XML_STATUS_ERROR;
/* Block after XML_Parse()/XML_ParseBuffer() has been called.
XXX There's no way for the caller to determine which of the
XXX possible error cases caused the XML_STATUS_ERROR return.
... | 0 | 9,590 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void perf_prepare_sample(struct perf_event_header *header,
struct perf_sample_data *data,
struct perf_event *event,
struct pt_regs *regs)
{
u64 sample_type = event->attr.sample_type;
header->type = PERF_RECORD_SAMPLE;
header->size = sizeof(*header) + event->header_size;
header->misc = 0;
header... | 0 | 22,494 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: error::Error GLES2DecoderImpl::HandleBufferData(
uint32 immediate_data_size, const cmds::BufferData& c) {
GLenum target = static_cast<GLenum>(c.target);
GLsizeiptr size = static_cast<GLsizeiptr>(c.size);
uint32 data_shm_id = static_cast<uint32>(c.data_shm_id);
uint32 data_shm_offset = static_cast<uint... | 0 | 16,576 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GpuCommandBufferStub::SetMemoryAllocation(
const GpuMemoryAllocation& allocation) {
allocation_ = allocation;
SendMemoryAllocationToProxy(allocation);
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958... | 0 | 1,158 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sockaddr_setport(struct sockaddr *sa, ev_uint16_t port)
{
if (sa->sa_family == AF_INET) {
((struct sockaddr_in *)sa)->sin_port = htons(port);
} else if (sa->sa_family == AF_INET6) {
((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
}
}
Commit Message: evdns: fix searching empty hostnames
From #332:
... | 0 | 18,977 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int comm_open(struct inode *inode, struct file *filp)
{
int ret;
ret = single_open(filp, comm_show, NULL);
if (!ret) {
struct seq_file *m = filp->private_data;
m->private = inode;
}
return ret;
}
Commit Message: fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.... | 0 | 788 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: explicit TestBrowserClient(MediaObserver* media_observer)
: media_observer_(media_observer) {}
Commit Message: Make MediaStreamDispatcherHost per-request instead of per-frame.
Instead of having RenderFrameHost own a single MSDH to handle all
requests from a frame, MSDH objects will be owned by a strong ... | 0 | 1,012 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int ip6mr_vif_open(struct inode *inode, struct file *file)
{
return seq_open_net(inode, file, &ip6mr_vif_seq_ops,
sizeof(struct ipmr_vif_iter));
}
Commit Message: ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") f... | 0 | 16,649 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GraphicsContext::concatCTM(const AffineTransform& transform)
{
if (paintingDisabled())
return;
#if USE(WXGC)
wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
if (gc)
gc->ConcatTransform(transform);
#endif
return;
}
Commit Message: Reviewed by Kevin Ollivier.
[... | 0 | 29,629 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void cpu_init_hyp_mode(void *dummy)
{
unsigned long long boot_pgd_ptr;
unsigned long long pgd_ptr;
unsigned long hyp_stack_ptr;
unsigned long stack_page;
unsigned long vector_ptr;
/* Switch from the HYP stub to our own HYP init vector */
__hyp_set_vectors(kvm_get_idmap_vector());
boot_pgd_ptr = (... | 0 | 11,812 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void swap_free_obj(struct page *page, unsigned int a, unsigned int b)
{
swap(((freelist_idx_t *)page->freelist)[a],
((freelist_idx_t *)page->freelist)[b]);
}
Commit Message: mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a ... | 0 | 5,868 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool EnableCaretInEditableText(LocalFrame& frame,
Event* event,
EditorCommandSource source) {
frame.GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
if (source == kCommandFromMenuOrKeyBinding &&
!frame.Sele... | 0 | 13,019 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ztoken(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
switch (r_type(op)) {
default:
return_op_typecheck(op);
case t_file: {
stream *s;
scanner_state state;
check_read_file(i_ctx_p, s, op);
check_ostack(1);
gs_scanner_init(&st... | 0 | 28,102 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void OverloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
scheduler::CooperativeSchedulingManager::Instance()->Safepoint();
bool is_arity_error = false;
switch (std::min(2, info.Length())) {
case 1:
if (info[0]->IsNumber()) {
OverloadedMethodL1Method(info);
... | 0 | 16,057 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: FormControlState HTMLSelectElement::saveFormControlState() const
{
const Vector<HTMLElement*>& items = listItems();
size_t length = items.size();
FormControlState state;
for (unsigned i = 0; i < length; ++i) {
if (!items[i]->hasTagName(optionTag))
continue;
HTMLOptionEl... | 0 | 25,297 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool ContentSecurityPolicy::allowInlineScript(
Element* element,
const String& contextURL,
const String& nonce,
const WTF::OrdinalNumber& contextLine,
const String& scriptContent,
SecurityViolationReportingPolicy reportingPolicy) const {
DCHECK(element);
return isAllowedByAll<&CSPDirec... | 0 | 27,075 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* {{{{ */
{
spl_dllist_object *intern = Z_SPLDLLIST_P(obj);
spl_ptr_llist_element *current = intern->llist->head, *next;
zval tmp, dllist_array;
zend_string *pnstr;
int i = 0;
HashTable *debug_info;
*is_temp = 1;
if (!inte... | 0 | 9,359 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: krb5_get_init_creds_keyblock(krb5_context context,
krb5_creds *creds,
krb5_principal client,
krb5_keyblock *keyblock,
krb5_deltat start_time,
const char *in_tkt_service,
krb5_get_init_creds_opt *options)
{
krb5_init_creds_context ctx;
krb5_error_code ret;
... | 0 | 12,613 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PassRefPtrWillBeRawPtr<TouchList> Document::createTouchList(WillBeHeapVector<RefPtrWillBeMember<Touch>>& touches) const
{
return TouchList::adopt(touches);
}
Commit Message: Change Document::detach() to RELEASE_ASSERT all subframes are gone.
BUG=556724,577105
Review URL: https://codereview.chromium.org/166... | 0 | 3,695 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
{
struct rq *rq_dest, *rq_src;
int ret = 0;
if (unlikely(!cpu_active(dest_cpu)))
return ret;
rq_src = cpu_rq(src_cpu);
rq_dest = cpu_rq(dest_cpu);
raw_spin_lock(&p->pi_lock);
double_rq_lock(rq_src, rq_dest);
/* Already moved.... | 0 | 268 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: qboolean S_AL_BufferInit( void )
{
if(alBuffersInitialised)
return qtrue;
memset(knownSfx, 0, sizeof(knownSfx));
numSfx = 0;
default_sfx = S_AL_BufferFind("sound/feedback/hit.wav");
S_AL_BufferUse(default_sfx);
knownSfx[default_sfx].isLocked = qtrue;
alBuffersInitialised = qtrue;
return qtrue;
}
Com... | 0 | 25,525 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FS_AddGameDirectory( const char *path, const char *dir, qboolean allowUnzippedDLLs ) {
searchpath_t *sp;
int i;
searchpath_t *search;
pack_t *pak;
char curpath[MAX_OSPATH + 1], *pakfile;
int numfiles;
char **pakfiles;
char *sorted[MAX_PAKFILES];
Q_str... | 0 | 23,495 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height)
{
gdImagePtr im_scaled = NULL;
if (src == NULL || src->interpolation_id < 0 || src->interpolation_id > GD_METHOD_COUNT) {
return 0;
}
switch (src->interpolation_id) {
/*Special cases, ... | 0 | 4,663 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::OnSetOverlayRoutingToken(
const base::UnguessableToken& token) {
overlay_routing_token_ = token;
for (const auto& cb : pending_routing_token_callbacks_)
cb.Run(overlay_routing_token_.value());
pending_routing_token_callbacks_.clear();
}
Commit Message: Convert FrameHostMsg_Did... | 0 | 7,476 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: u64 lvid_get_unique_id(struct super_block *sb)
{
struct buffer_head *bh;
struct udf_sb_info *sbi = UDF_SB(sb);
struct logicalVolIntegrityDesc *lvid;
struct logicalVolHeaderDesc *lvhd;
u64 uniqueID;
u64 ret;
bh = sbi->s_lvid_bh;
if (!bh)
return 0;
lvid = (struct logicalVolIntegrityDesc *)bh->b_data;
... | 0 | 20,617 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
struct vm_area_struct *vma, pud_t *pud,
unsigned long addr, unsigned long end,
struct zap_details *details)
{
pmd_t *pmd;
unsigned long next;
pmd = pmd_offset(pud, addr);
do {
next = pmd_addr_end(addr, end);
if (pmd_trans_huge(... | 0 | 4,905 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.