instruction stringclasses 1
value | input stringlengths 56 241k | output int64 0 1 | __index_level_0__ int64 0 175k |
|---|---|---|---|
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_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
const struct nfs4_readlink *args)
{
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequence(xdr, &args->seq_args, &hdr);
encode_putfh(xd... | 0 | 23,484 |
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: long join_session_keyring(const char *name)
{
const struct cred *old;
struct cred *new;
struct key *keyring;
long ret, serial;
new = prepare_creds();
if (!new)
return -ENOMEM;
old = current_cred();
/* if no name is provided, install an anonymous keyring */
if (!name) {
ret = install_session_keyring... | 0 | 60,279 |
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 reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8E... | 0 | 122,574 |
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 OMX::getConfig(
node_id node, OMX_INDEXTYPE index,
void *params, size_t size) {
return findInstance(node)->getConfig(
index, params, size);
}
Commit Message: Add VPX output buffer size check
and handle dead observers more gracefully
Bug: 27597103
Change-Id: Id7acb25d5ef69b197da15... | 0 | 160,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: int get_dumpable(struct mm_struct *mm)
{
return __get_dumpable(mm->flags);
}
Commit Message: exec/ptrace: fix get_dumpable() incorrect tests
The get_dumpable() return value is not boolean. Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0). Th... | 0 | 30,910 |
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 SpdyProxyClientSocket::DoSendRequest() {
next_state_ = STATE_SEND_REQUEST_COMPLETE;
HttpRequestHeaders authorization_headers;
if (auth_->HaveAuth()) {
auth_->AddAuthorizationHeader(&authorization_headers);
}
std::string request_line;
HttpRequestHeaders request_headers;
BuildTunnelRequest(r... | 0 | 129,358 |
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 Track::Info::CopyStr(char* Info::*str, Info& dst_) const
{
if (str == static_cast<char* Info::*>(NULL))
return -1;
char*& dst = dst_.*str;
if (dst) //should be NULL already
return -1;
const char* const src = this->*str;
if (src == NULL)
return 0;
const size_t l... | 1 | 174,254 |
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: write_pid_file(const char *path)
{
FILE *file;
unsigned long pid;
file = fopen(path, "w");
if (file == NULL)
return errno;
pid = (unsigned long) getpid();
if (fprintf(file, "%ld\n", pid) < 0 || fclose(file) == EOF)
return errno;
return 0;
}
Commit Message: Multi-realm... | 0 | 28,286 |
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 GLES2DecoderImpl::GenVertexArraysOESHelper(
GLsizei n, const GLuint* client_ids) {
for (GLsizei ii = 0; ii < n; ++ii) {
if (GetVertexAttribManager(client_ids[ii])) {
return false;
}
}
if (!features().native_vertex_array_object) {
for (GLsizei ii = 0; ii < n; ++ii) {
CreateV... | 0 | 120,893 |
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: ofproto_aa_mapping_register(struct ofproto *ofproto, void *aux,
const struct aa_mapping_settings *s)
{
if (!ofproto->ofproto_class->aa_mapping_set) {
return EOPNOTSUPP;
}
ofproto->ofproto_class->aa_mapping_set(ofproto, aux, s);
return 0;
}
Commit Message: ofpro... | 0 | 77,293 |
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 NBLSetRSCInfo(PPARANDIS_ADAPTER pContext, PNET_BUFFER_LIST pNBL,
PNET_PACKET_INFO PacketInfo, UINT nCoalescedSegments)
{
NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO qCSInfo;
qCSInfo.Value = NULL;
qCSInfo.Receive.IpChecksumSucceeded = TRUE;
qCSInfo.Receive.IpChecksumValueInva... | 0 | 96,356 |
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: format_SET_IPV4_DST(const struct ofpact_ipv4 *a, struct ds *s)
{
ds_put_format(s, "%smod_nw_dst:%s"IP_FMT,
colors.param, colors.end, IP_ARGS(a->ipv4));
}
Commit Message: ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/d... | 0 | 76,946 |
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 struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
{
struct sock *sk, *parent = chan->data;
/* Check for backlog size */
if (sk_acceptq_is_full(parent)) {
BT_DBG("backlog full %d", parent->sk_ack_backlog);
return NULL;
}
sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO... | 0 | 94,528 |
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: uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {
uint8_t ead, eal, fcs;
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
uint8_t* p_start = p_data;
uint16_t len;
if (p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
RFCOMM_TRACE_ERROR("Bad Length1: %d", p_buf->len);
return (RFC_E... | 0 | 162,908 |
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 Document::loadEventDelayTimerFired(Timer<Document>*)
{
if (frame())
frame()->loader()->checkCompleted();
}
Commit Message: Refactoring: Move m_mayDisplaySeamlesslyWithParent down to Document
The member is used only in Document, thus no reason to
stay in SecurityContext.
TEST=none
BUG=none
R=ha... | 0 | 102,779 |
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_free_pages(struct page **pages, size_t size)
{
int i;
if (!pages)
return;
for (i = 0; i < size; i++) {
if (!pages[i])
break;
__free_page(pages[i]);
}
kfree(pages);
}
Commit Message: NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overf... | 0 | 29,154 |
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: ModuleExport MagickBooleanType ReadPSDLayers(Image *image,
const ImageInfo *image_info,const PSDInfo *psd_info,
const MagickBooleanType skip_layers,ExceptionInfo *exception)
{
char
type[4];
LayerInfo
*layer_info;
MagickSizeType
size;
MagickBooleanType
status;
register ssize_t
... | 1 | 170,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 enableLogChannel(const char* name)
{
#if !LOG_DISABLED
WTFLogChannel* channel = getChannelFromName(name);
if (channel)
channel->state = WTFLogChannelOn;
#endif // !LOG_DISABLED
}
Commit Message: Correctly keep track of isolates for microtask execution
BUG=487155
R=haraken@chromium.org
Revi... | 0 | 127,639 |
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 Performance::AddResourceTiming(const WebResourceTimingInfo& info,
const AtomicString& initiator_type) {
if (IsResourceTimingBufferFull() &&
!HasObserverFor(PerformanceEntry::kResource))
return;
PerformanceEntry* entry =
PerformanceResourceTiming::Creat... | 0 | 153,849 |
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 FileSystemOperationRunner::DidGetMetadata(
const OperationID id,
GetMetadataCallback callback,
base::File::Error rv,
const base::File::Info& file_info) {
if (is_beginning_operation_) {
finished_operations_.insert(id);
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,... | 0 | 152,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: LocalSiteCharacteristicsDatabaseTest()
: scoped_set_tick_clock_for_testing_(&test_clock_),
test_server_(net::test_server::EmbeddedTestServer::TYPE_HTTPS) {}
Commit Message: Connect the LocalDB to TabManager.
Bug: 773382
Change-Id: Iec8fe5226ee175105d51f300f30b4865478ac099
Reviewed-on: https://ch... | 0 | 132,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 struct rq *find_busiest_queue(struct lb_env *env,
struct sched_group *group)
{
struct rq *busiest = NULL, *rq;
unsigned long busiest_load = 0, busiest_capacity = 1;
int i;
for_each_cpu_and(i, sched_group_span(group), env->cpus) {
unsigned long capacity, wl;
enum fbq_type rt;
rq = cpu_r... | 0 | 92,552 |
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: FailedJobInterceptor() {}
Commit Message: Enforce the WebUsbAllowDevicesForUrls policy
This change modifies UsbChooserContext to use the UsbAllowDevicesForUrls
class to consider devices allowed by the WebUsbAllowDevicesForUrls
policy. The WebUsbAllowDevicesForUrls policy overrides the other WebUSB
policies. U... | 0 | 157,037 |
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 void encode_openhdr(struct xdr_stream *xdr, const struct nfs_openargs *arg)
{
__be32 *p;
/*
* opcode 4, seqid 4, share_access 4, share_deny 4, clientid 8, ownerlen 4,
* owner 4 = 32
*/
p = reserve_space(xdr, 8);
*p++ = cpu_to_be32(OP_OPEN);
*p = cpu_to_be32(arg->seqid->sequence->counter);
e... | 0 | 23,377 |
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: Response PageHandler::SetWebLifecycleState(const std::string& state) {
WebContentsImpl* web_contents = GetWebContents();
if (!web_contents)
return Response::Error("Not attached to a page");
if (state == Page::SetWebLifecycleState::StateEnum::Frozen) {
web_contents->WasHidden();
web_contents->Set... | 0 | 143,630 |
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 const char *set_define(cmd_parms *cmd, void *dummy,
const char *name, const char *value)
{
if (cmd->parent && ap_cstr_casecmp(cmd->parent->directive, "<VirtualHost")) {
return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ",
... | 0 | 64,276 |
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 fm10k_poll(struct napi_struct *napi, int budget)
{
struct fm10k_q_vector *q_vector =
container_of(napi, struct fm10k_q_vector, napi);
struct fm10k_ring *ring;
int per_ring_budget, work_done = 0;
bool clean_complete = true;
fm10k_for_each_ring(ring, q_vector->tx) {
if (!fm10k_clean_tx_... | 0 | 87,935 |
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: PPResultAndExceptionToNPResult::PPResultAndExceptionToNPResult(
NPObject* object_var,
NPVariant* np_result)
: object_var_(object_var),
np_result_(np_result),
exception_(PP_MakeUndefined()),
success_(false),
checked_exception_(false) {
}
Commit Message: Fix invalid read in ppap... | 0 | 100,874 |
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: AutofillTest() {
EnableDOMAutomation();
}
Commit Message: Convert the autofill interactive browser test to a normal browser_test. I added testing methods to fake input events that don't depend on the OS and being at the front.
BUG=121574
Review URL: https://chromiumcodereview.appspot.com/10368010
git-s... | 0 | 103,224 |
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 ShouldHideActiveAppsFromShelf() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
kHideActiveAppsFromShelf);
}
Commit Message: Add a fake DriveFS launcher client.
Using DriveFS requires building and deploying ChromeOS. Add a client for
the fake DriveFS launcher to allow the use of a real ... | 0 | 124,076 |
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: Fopen(char *file, char *type)
{
FILE *iop;
#ifndef HAS_SAVED_IDS_AND_SETEUID
struct pid *cur;
int pdes[2], pid;
if (file == NULL || type == NULL)
return NULL;
if ((*type != 'r' && *type != 'w') || type[1])
return NULL;
if ((cur = malloc(sizeof(struct pid))) == NULL)
return NULL;
... | 0 | 13,350 |
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_ofp10_phy_port(struct ofputil_phy_port *pp,
const struct ofp10_phy_port *opp)
{
pp->port_no = u16_to_ofp(ntohs(opp->port_no));
pp->hw_addr = opp->hw_addr;
ovs_strlcpy(pp->name, opp->name, OFP_MAX_PORT_NAME_LEN);
pp->config = ntohl(opp->config) & OFPPC1... | 0 | 77,516 |
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 mov_read_close(AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
int i, j;
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
MOVStreamContext *sc = st->priv_data;
av_freep(&sc->ctts_data);
for (j = 0; j < sc->drefs_count; j++) {
... | 0 | 54,511 |
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 nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr,
bool has_error_code, u32 error_code)
{
int vmexit;
if (!is_guest_mode(&svm->vcpu))
return 0;
svm->vmcb->control.exit_code = SVM_EXIT_EXCP_BASE + nr;
svm->vmcb->control.exit_code_hi = 0;
svm->vmcb->control.exit_info_1 = err... | 0 | 37,778 |
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 update_command_run_log(const char* message, struct analyze_event_data *evd)
{
const bool it_is_a_dot = (message[0] == '.' && message[1] == '\0');
if (!it_is_a_dot)
gtk_label_set_text(g_lbl_event_log, message);
/* Don't append new line behind single dot */
const char *log_msg ... | 0 | 42,882 |
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 HTMLMediaElement::AudioSourceProviderImpl::SetClient(
AudioSourceProviderClient* client) {
MutexLocker locker(provide_input_lock);
if (client)
client_ = new HTMLMediaElement::AudioClientImpl(client);
else
client_.Clear();
if (web_audio_source_provider_)
web_audio_source_provider_->S... | 0 | 144,581 |
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::didChangeScrollOffset(blink::WebLocalFrame* frame) {
DCHECK(!frame_ || frame_ == frame);
render_view_->didChangeScrollOffset(frame);
FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidChangeScrollOffset());
}
Commit Message: Connect WebUSB client interface to the devices app
This... | 0 | 123,220 |
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: struct vhost_fdt_hash_table *mk_vhost_fdt_table_lookup(int id, struct host *host)
{
struct mk_list *head;
struct mk_list *vhost_list;
struct vhost_fdt_host *fdt_host;
struct vhost_fdt_hash_table *ht = NULL;
vhost_list = mk_vhost_fdt_key;
mk_list_foreach(head, vhost_list) {
fdt_hos... | 0 | 36,168 |
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 BlinkTestRunner::ReportLeakDetectionResult(
const LeakDetectionResult& report) {
Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
}
Commit Message: content: Rename webkit_test_helpers.{cc,h} to blink_test_helpers.{cc,h}
Now that webkit/ is gone, we are preparing ourselves for the m... | 0 | 123,586 |
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: GURL NetworkHandler::ClearUrlRef(const GURL& url) {
if (!url.has_ref())
return url;
GURL::Replacements replacements;
replacements.ClearRef();
return url.ReplaceComponents(replacements);
}
Commit Message: DevTools: speculative fix for crash in NetworkHandler::Disable
This keeps BrowserContext* and St... | 0 | 148,501 |
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: struct kern_ipc_perm *ipcctl_pre_down_nolock(struct ipc_namespace *ns,
struct ipc_ids *ids, int id, int cmd,
struct ipc64_perm *perm, int extra_perm)
{
kuid_t euid;
int err = -EPERM;
struct kern_ipc_perm *ipcp;
ipcp = ipc_obtain_object_check(ids, id);
if (IS_ERR(ipcp)) {
err = PTR_ERR(ipcp);
g... | 0 | 42,047 |
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: btpan_interface_t *btif_pan_get_interface()
{
return &pan_if;
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Conflicts:
btif/co/bta_hh_co.c
btif/src/btif_core.c
Merge conflict resolution of ag/116... | 0 | 158,776 |
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 ZIPARCHIVE_METHOD(statName)
{
struct zip *intern;
zval *self = getThis();
zend_long flags = 0;
struct zip_stat sb;
zend_string *name;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) {
return;
}
PHP_Z... | 0 | 54,393 |
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 ff_mpeg4_decode_studio_slice_header(Mpeg4DecContext *ctx)
{
MpegEncContext *s = &ctx->m;
GetBitContext *gb = &s->gb;
unsigned vlc_len;
uint16_t mb_num;
if (get_bits_left(gb) >= 32 && get_bits_long(gb, 32) == SLICE_START_CODE) {
vlc_len = av_log2(s->mb_width * s->mb_height) + 1;
... | 0 | 74,799 |
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::HandleShaderBinary(
uint32 immediate_data_size, const cmds::ShaderBinary& c) {
#if 1 // No binary shader support.
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glShaderBinary", "not supported");
return error::kNoError;
#else
GLsizei n = static_cast<GLsizei>(c.n);
if (n < 0)... | 0 | 120,970 |
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: irc_server_msgq_flush ()
{
struct t_irc_message *next;
char *ptr_data, *new_msg, *ptr_msg, *pos;
char *nick, *host, *command, *channel, *arguments;
char *msg_decoded, *msg_decoded_without_color;
char str_modifier[64], modifier_data[256];
while (irc_recv_msgq)
{
if (irc_rec... | 0 | 3,498 |
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: TEE_Result syscall_get_property(unsigned long prop_set,
unsigned long index,
void *name, uint32_t *name_len,
void *buf, uint32_t *blen,
uint32_t *prop_type)
{
struct tee_ta_session *sess;
TEE_Result res;
TEE_Result res2;
const struct tee_props *prop;
uint32_t klen;
size_t klen_size;
uint32_... | 0 | 86,912 |
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 AwContents::OnDraw(JNIEnv* env,
jobject obj,
jobject canvas,
jboolean is_hardware_accelerated,
jint scroll_x,
jint scroll_y,
jint visible_left,
... | 0 | 119,605 |
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 Com_RunAndTimeServerPacket( netadr_t *evFrom, msg_t *buf ) {
int t1, t2, msec;
t1 = 0;
if ( com_speeds->integer ) {
t1 = Sys_Milliseconds ();
}
SV_PacketEvent( *evFrom, buf );
if ( com_speeds->integer ) {
t2 = Sys_Milliseconds ();
msec = t2 - t1;
if ( com_speeds->integer == 3 ) {
Com_Pr... | 0 | 95,484 |
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 AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
{
AVIndexEntry *sample = NULL;
int64_t best_dts = INT64_MAX;
int i;
for (i = 0; i < s->nb_streams; i++) {
AVStream *avst = s->streams[i];
MOVStreamContext *msc = avst->priv_data;
if (msc->pb && msc... | 0 | 54,497 |
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::Size WebContentsImpl::GetPreferredSize() const {
return preferred_size_;
}
Commit Message: Cancel JavaScript dialogs when an interstitial appears.
BUG=295695
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/24360011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225... | 0 | 110,652 |
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 ShowTaskManager() {
TaskManagerView::Show(false);
}
Commit Message: accelerators: Remove deprecated Accelerator ctor that takes booleans.
BUG=128242
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10399085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137957 0039d316-1c4b-42... | 0 | 106,569 |
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: AccessControlStatus ScriptResource::CalculateAccessControlStatus() const {
if (GetCORSStatus() == CORSStatus::kServiceWorkerOpaque)
return kOpaqueResource;
if (IsSameOriginOrCORSSuccessful())
return kSharableCrossOrigin;
return kNotSharableCrossOrigin;
}
Commit Message: Check CORS using Passe... | 1 | 172,889 |
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 PrintingMessageFilter::OnDuplicateSection(
base::SharedMemoryHandle renderer_handle,
base::SharedMemoryHandle* browser_handle) {
base::SharedMemory shared_buf(renderer_handle, true, peer_handle());
shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), browser_handle);
}
Commit Message: Fix p... | 0 | 97,483 |
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 RenderBox::backgroundHasOpaqueTopLayer() const
{
const FillLayer* fillLayer = style()->backgroundLayers();
if (!fillLayer || fillLayer->clip() != BorderFillBox)
return false;
if (hasOverflowClip() && fillLayer->attachment() == LocalBackgroundAttachment)
return false;
if (fil... | 0 | 116,460 |
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 prb_setup_retire_blk_timer(struct packet_sock *po)
{
struct tpacket_kbdq_core *pkc;
pkc = GET_PBDQC_FROM_RB(&po->rx_ring);
prb_init_blk_timer(po, pkc, prb_retire_rx_blk_timer_expired);
}
Commit Message: packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it w... | 0 | 49,215 |
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 H264SwDecRelease(H264SwDecInst decInst)
{
decContainer_t *pDecCont;
DEC_API_TRC("H264SwDecRelease#");
if (decInst == NULL)
{
DEC_API_TRC("H264SwDecRelease# ERROR: decInst == NULL");
return;
}
pDecCont = (decContainer_t*)decInst;
#ifdef H264DEC_TRACE
sprintf(pDecCont->str, "H264S... | 0 | 160,884 |
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 FileReaderLoader::failed(int errorCode)
{
m_errorCode = errorCode;
cleanup();
if (m_client)
m_client->didFail(m_errorCode);
}
Commit Message: Remove BlobRegistry indirection since there is only one implementation.
BUG=
Review URL: https://chromiumcodereview.appspot.com/15851008
git-sv... | 0 | 102,496 |
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 Dispatcher::OnDeliverMessage(int target_port_id, const Message& message) {
scoped_ptr<RequestSender::ScopedTabID> scoped_tab_id;
std::map<int, int>::const_iterator it =
port_to_tab_id_map_.find(target_port_id);
if (it != port_to_tab_id_map_.end()) {
scoped_tab_id.reset(
new RequestSen... | 0 | 132,553 |
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: __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len)
{
__sum16 sum;
sum = csum_fold(skb_checksum(skb, 0, len, skb->csum));
if (likely(!sum)) {
if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
netdev_rx_csum_fault(skb->dev);
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
return sum;
}
Commi... | 0 | 33,833 |
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 ArthurOutputDev::updateFillColor(GfxState *state)
{
GfxRGB rgb;
QColor brushColour = m_currentBrush.color();
state->getFillRGB(&rgb);
brushColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), brushColour.alphaF());
m_currentBrush.setColor(brushColour);
}
Commit Message:
CWE ID: CWE-1... | 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: static int gather_hugetbl_stats(pte_t *pte, unsigned long hmask,
unsigned long addr, unsigned long end, struct mm_walk *walk)
{
return 0;
}
Commit Message: mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
commit 1a5a9906d4e8d1976b701f889d8f35d54b928f25 upstream.
In some cases it ma... | 0 | 20,980 |
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 v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TestObj.withScriptExecutionContextAndScriptStateWithSpaces");
TestObj* imp = V8TestObj::toNative(args.Holder());
EmptyScriptState state;
ScriptExecutionContext* scrip... | 0 | 109,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: bool IsNonBrowserProcess() {
assert(g_process_type != ProcessType::UNINITIALIZED);
return g_process_type != ProcessType::BROWSER_PROCESS;
}
Commit Message: Ignore switches following "--" when parsing a command line.
BUG=933004
R=wfh@chromium.org
Change-Id: I911be4cbfc38a4d41dec85d85f7fe0f50ddca392
Reviewed... | 0 | 152,648 |
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 | 169,781 |
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 SyncBackendHost::AddExperimentalTypes() {
CHECK(initialized());
Experiments experiments;
if (core_->sync_manager()->ReceivedExperiment(&experiments))
frontend_->OnExperimentsChanged(experiments);
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TES... | 0 | 104,827 |
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 StartupBrowserCreator::ProcessLastOpenedProfiles(
const base::CommandLine& command_line,
const base::FilePath& cur_dir,
chrome::startup::IsProcessStartup is_process_startup,
chrome::startup::IsFirstRun is_first_run,
Profile* last_used_profile,
const Profiles& last_opened_profiles) {
... | 0 | 137,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 inline void apic_set_spiv(struct kvm_lapic *apic, u32 val)
{
if ((kvm_apic_get_reg(apic, APIC_SPIV) ^ val) & APIC_SPIV_APIC_ENABLED) {
if (val & APIC_SPIV_APIC_ENABLED)
static_key_slow_dec_deferred(&apic_sw_disabled);
else
static_key_slow_inc(&apic_sw_disabled.key);
}
apic_set_reg(apic, APIC_S... | 0 | 28,737 |
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 __poll_t ib_uverbs_comp_event_poll(struct file *filp,
struct poll_table_struct *wait)
{
struct ib_uverbs_completion_event_file *comp_ev_file =
filp->private_data;
return ib_uverbs_event_poll(&comp_ev_file->ev_queue, filp, wait);
}
Commit Message: coredump: fix race condition between mmget_... | 0 | 90,449 |
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_parse_file_flags(struct xar *xar, const char *name)
{
const char *flag = NULL;
if (strcmp(name, "UserNoDump") == 0) {
xar->xmlsts = FILE_FLAGS_USER_NODUMP;
flag = "nodump";
}
else if (strcmp(name, "UserImmutable") == 0) {
xar->xmlsts = FILE_FLAGS_USER_IMMUTABLE;
flag = "uimmutable";
}
else if (... | 0 | 61,677 |
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: pch_timestr (bool which)
{
return p_timestr[which];
}
Commit Message:
CWE ID: CWE-78 | 0 | 2,711 |
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 WebContentsImpl::ClearAllPowerSaveBlockers() {
for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
i != power_save_blockers_.end(); ++i)
STLDeleteValues(&power_save_blockers_[i->first]);
power_save_blockers_.clear();
}
Commit Message: Cancel JavaScript dialogs when an intersti... | 0 | 110,563 |
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 struct list_head *rb_list_head(struct list_head *list)
{
unsigned long val = (unsigned long)list;
return (struct list_head *)(val & ~RB_FLAG_MASK);
}
Commit Message: ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_... | 0 | 72,558 |
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: DiscardableMemoryImpl(ClientDiscardableSharedMemoryManager* manager,
std::unique_ptr<DiscardableSharedMemoryHeap::Span> span)
: manager_(manager), span_(std::move(span)), is_locked_(true) {}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of m... | 0 | 149,029 |
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 SetUpEnvironment() {
ImageTransportFactory::SetFactory(
std::make_unique<TestImageTransportFactory>());
aura_test_helper_.reset(new aura::test::AuraTestHelper());
aura_test_helper_->SetUp(
ImageTransportFactory::GetInstance()->GetContextFactory(),
ImageTransportFactory::... | 0 | 145,639 |
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 DCTStream::readHuffSym(DCTHuffTable *table) {
Gushort code;
int bit;
int codeBits;
code = 0;
codeBits = 0;
do {
if ((bit = readBit()) == EOF) {
return 9999;
}
code = (code << 1) + bit;
++codeBits;
if (code < table->firstCode[codeBits]) {
break;
}
if (code ... | 0 | 4,017 |
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 lua_ap_requestbody(lua_State *L)
{
const char *filename;
request_rec *r;
apr_off_t maxSize;
r = ap_lua_check_request_rec(L, 1);
filename = luaL_optstring(L, 2, 0);
maxSize = luaL_optint(L, 3, 0);
if (r) {
apr_off_t size;
if (maxSize > 0 && r... | 0 | 45,073 |
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 WebContentsImpl::AccessibilityLocationChangesReceived(
const std::vector<AXLocationChangeNotificationDetails>& details) {
for (auto& observer : observers_)
observer.AccessibilityLocationChangesReceived(details);
}
Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen.
BU... | 0 | 135,623 |
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 V8Debugger::clearBreakpoints()
{
v8::HandleScope scope(m_isolate);
v8::Context::Scope contextScope(debuggerContext());
v8::Local<v8::Function> clearBreakpoints = v8::Local<v8::Function>::Cast(m_debuggerScript.Get(m_isolate)->Get(toV8StringInternalized(m_isolate, "clearBreakpoints")));
v8::De... | 0 | 130,360 |
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: LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles()
: playback_allowed_event_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::SIGNALED) {}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of h... | 0 | 137,428 |
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: wifi_error wifi_set_nodfs_flag(wifi_interface_handle handle, u32 nodfs)
{
SetNodfsCommand command(handle, nodfs);
return (wifi_error) command.requestResponse();
}
Commit Message: Fix use-after-free in wifi_cleanup()
Release reference to cmd only after possibly calling getType().
BUG: 25753768
Change-Id: Id2... | 0 | 161,968 |
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 CL_Cache_MapChange_f( void ) {
cacheIndex++;
}
Commit Message: All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
CWE ID: CWE-269 | 0 | 95,643 |
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* async_message_thread (void *input)
{
OMX_BUFFERHEADERTYPE *buffer;
struct v4l2_plane plane[VIDEO_MAX_PLANES];
struct pollfd pfd;
struct v4l2_buffer v4l2_buf;
memset((void *)&v4l2_buf,0,sizeof(v4l2_buf));
struct v4l2_event dqevent;
omx_vdec *omx = reinterpret_cast<omx_vdec*>(input);
pfd.e... | 0 | 160,244 |
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: size_t RenderView::GetRenderViewCount() {
return g_view_map.Get().size();
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be able to cancel ongoing
browser initiated navigation if they are not user initiated.
Note: 'no... | 0 | 145,122 |
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: ftp_mkdir(ftpbuf_t *ftp, const char *dir)
{
char *mkd, *end;
if (ftp == NULL) {
return NULL;
}
if (!ftp_putcmd(ftp, "MKD", dir)) {
return NULL;
}
if (!ftp_getresp(ftp) || ftp->resp != 257) {
return NULL;
}
/* copy out the dir from response */
if ((mkd = strchr(ftp->inbuf, '"')) == NULL) {
mkd = ... | 0 | 14,797 |
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: DEFINE_TRACE(HTMLMediaElement::AudioClientImpl) {
visitor->trace(m_client);
}
Commit Message: [Blink>Media] Allow autoplay muted on Android by default
There was a mistake causing autoplay muted is shipped on Android
but it will be disabled if the chromium embedder doesn't specify
content setting for "AllowAut... | 0 | 128,731 |
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 ssize_t RandomX(RandomInfo *random_info,const size_t columns)
{
return((ssize_t) (columns*GetPseudoRandomValue(random_info)));
}
Commit Message: http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=28946
CWE ID: CWE-399 | 0 | 73,499 |
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: P2PQuicStreamImpl::P2PQuicStreamImpl(quic::QuicStreamId id,
quic::QuicSession* session)
: quic::QuicStream(id, session, /*is_static=*/false, quic::BIDIRECTIONAL) {}
Commit Message: P2PQuicStream write functionality.
This adds the P2PQuicStream::WriteData function and ad... | 1 | 172,263 |
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* DocumentLoader::document() const
{
if (m_frame && m_frame->loader()->documentLoader() == this)
return m_frame->document();
return 0;
}
Commit Message: Unreviewed, rolling out r147402.
http://trac.webkit.org/changeset/147402
https://bugs.webkit.org/show_bug.cgi?id=112903
Source/WebCore:... | 0 | 105,706 |
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 AXObject::name(AXNameFrom& nameFrom,
AXObject::AXObjectVector* nameObjects) const {
HeapHashSet<Member<const AXObject>> visited;
AXRelatedObjectVector relatedObjects;
String text = textAlternative(false, false, visited, nameFrom,
&relatedObjects, ... | 0 | 127,285 |
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: enum nss_status _nss_mymachines_gethostbyname3_r(
const char *name,
int af,
struct hostent *result,
char *buffer, size_t buflen,
int *errnop, int *h_errnop,
int32_t *ttlp,
char **canonp) {
_cle... | 0 | 74,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: void ClientControlledShellSurface::OnSetFrame(SurfaceFrameType type) {
if (container_ == ash::kShellWindowId_SystemModalContainer &&
type != SurfaceFrameType::NONE) {
LOG(WARNING)
<< "A surface in system modal container should not have a frame:"
<< static_cast<int>(type);
return;
... | 0 | 137,700 |
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 RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) {
delegate_->ResizeDueToAutoResize(new_size);
}
Commit Message: Filter more incoming URLs in the CreateWindow path.
BUG=170532
Review URL: https://chromiumcodereview.appspot.com/12036002
git-svn-id: svn://svn.chromium.org/chrome/trunk/s... | 0 | 117,253 |
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: xsltChooseComp(xsltStylesheetPtr style, xmlNodePtr inst) {
#ifdef XSLT_REFACTORED
xsltStyleItemChoosePtr comp;
#else
xsltStylePreCompPtr comp;
#endif
if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
return;
#ifdef XSLT_REFACTORED
comp = (xsltStyleItemChoosePtr)
xsltNe... | 0 | 156,779 |
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: ImportTIFF_CFATable ( const TIFF_Manager::TagInfo & tagInfo, bool nativeEndian,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
{
try { // Don't let errors with one stop the others.
const XMP_Uns8 * bytePtr = (XMP_Uns8*)tagInfo.dataPtr;
const XMP_Uns8 * byteEnd = bytePtr + tagInfo.dataLen;... | 0 | 15,981 |
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 BOOLEAN check_cached_remote_name(tBTA_DM_SEARCH *p_search_data,
UINT8 *p_remote_name, UINT8 *p_remote_name_len)
{
bt_bdname_t bdname;
bt_bdaddr_t remote_bdaddr;
bt_property_t prop_name;
/* check if we already have it in our btif_storage cache */
bdcpy(remote_bdaddr.... | 0 | 158,621 |
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 EnterpriseEnrollmentScreen::PrepareToShow() {
actor_->PrepareToShow();
}
Commit Message: Reset the device policy machinery upon retrying enrollment.
BUG=chromium-os:18208
TEST=See bug description
Review URL: http://codereview.chromium.org/7676005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@976... | 0 | 97,719 |
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 http_txn_reset_res(struct http_txn *txn)
{
txn->rsp.flags = 0;
txn->rsp.sol = txn->rsp.eol = txn->rsp.eoh = 0; /* relative to the buffer */
txn->rsp.next = 0;
txn->rsp.chunk_len = 0LL;
txn->rsp.body_len = 0LL;
txn->rsp.msg_state = HTTP_MSG_RPBEFORE; /* at the very beginning of the response */
}
Commit... | 0 | 6,862 |
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 get_freq(RangeCoder *rc, unsigned total_freq, unsigned *freq)
{
if (total_freq == 0)
return AVERROR_INVALIDDATA;
rc->range = rc->range / total_freq;
if (rc->range == 0)
return AVERROR_INVALIDDATA;
*freq = rc->code / rc->range;
return 0;
}
Commit Message: avcodec... | 0 | 63,940 |
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 regulator_init(void)
{
int ret;
ret = class_register(®ulator_class);
debugfs_root = debugfs_create_dir("regulator", NULL);
if (!debugfs_root)
pr_warn("regulator: Failed to create debugfs directory\n");
debugfs_create_file("supply_map", 0444, debugfs_root, NULL,
&supply_map_fo... | 0 | 74,514 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.