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: PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const
{
RefPtr<Element> element = createHTMLElement(document(), m_tagName);
if (m_inlineStyle.length())
element->setAttribute(styleAttr, m_inlineStyle);
return element.release();
}
Commit Message: Remove false assertion in App... | 0 | 110,966 |
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 CLASS median4 (int *p)
{
int min, max, sum, i;
min = max = sum = p[0];
for (i=1; i < 4; i++) {
sum += p[i];
if (min > p[i]) min = p[i];
if (max < p[i]) max = p[i];
}
return (sum - min - max) >> 1;
}
Commit Message: Avoid overflow in ljpeg_start().
CWE ID: CWE-189 | 0 | 43,318 |
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 ffs_data_clear(struct ffs_data *ffs)
{
ENTER();
ffs_closed(ffs);
BUG_ON(ffs->gadget);
if (ffs->epfiles)
ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count);
if (ffs->ffs_eventfd)
eventfd_ctx_put(ffs->ffs_eventfd);
kfree(ffs->raw_descs_data);
kfree(ffs->raw_strings);
kfree(ffs->stringtab... | 0 | 49,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: static bool is_maintenance_mode_cmd(struct kernel_ipmi_msg *msg)
{
return (((msg->netfn == IPMI_NETFN_APP_REQUEST)
&& ((msg->cmd == IPMI_COLD_RESET_CMD)
|| (msg->cmd == IPMI_WARM_RESET_CMD)))
|| (msg->netfn == IPMI_NETFN_FIRMWARE_REQUEST));
}
Commit Message: ipmi: fix use-after-free of user->release... | 0 | 91,305 |
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 QQuickWebView::hoverEnterEvent(QHoverEvent* event)
{
Q_D(QQuickWebView);
d->pageView->eventHandler()->handleHoverMoveEvent(event);
}
Commit Message: [Qt][WK2] Allow transparent WebViews
https://bugs.webkit.org/show_bug.cgi?id=80608
Reviewed by Tor Arne Vestbø.
Added support for transparentBackgrou... | 0 | 101,718 |
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 BaseRenderingContext2D::ClearCanvas() {
FloatRect canvas_rect(0, 0, Width(), Height());
CheckOverdraw(canvas_rect, nullptr, CanvasRenderingContext2DState::kNoImage,
kClipFill);
PaintCanvas* c = DrawingCanvas();
if (c)
c->clear(HasAlpha() ? SK_ColorTRANSPARENT : SK_ColorBLACK);
}
... | 0 | 149,870 |
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: const DictionaryValue* FindTraceEntry(
const ListValue& trace_parsed,
const char* string_to_match,
const DictionaryValue* match_after_this_item = NULL) {
size_t trace_parsed_count = trace_parsed.GetSize();
for (size_t i = 0; i < trace_parsed_count; i++) {
const Value* value = NULL;
trace_p... | 0 | 121,390 |
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 RenderBlock::removePercentHeightDescendant(RenderBox* descendant)
{
removeFromTrackedRendererMaps(descendant, gPercentHeightDescendantsMap, gPercentHeightContainerMap);
}
Commit Message: Separate repaint and layout requirements of StyleDifference (Step 1)
Previously StyleDifference was an enum that pro... | 0 | 116,282 |
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: CSSStyleSheet* Document::createCSSStyleSheetSync(
ScriptState* script_state,
const String& text,
ExceptionState& exception_state) {
return Document::createCSSStyleSheetSync(
script_state, text, CSSStyleSheetInit::Create(), exception_state);
}
Commit Message: Inherit the navigation initiator w... | 0 | 152,437 |
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: std::unique_ptr<TracedValue> InspectorSendRequestEvent::Data(
unsigned long identifier,
LocalFrame* frame,
const ResourceRequest& request) {
String request_id = IdentifiersFactory::RequestId(identifier);
std::unique_ptr<TracedValue> value = TracedValue::Create();
value->SetString("requestId", r... | 0 | 138,619 |
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(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
if (n <= 0) {
return;
}
gdImageLine (im, p->x, p->y, p[n - 1].x, p[n - 1].y, c);
gdImageOpenPolygon (im, p, n, c);
}
Commit Message: Fix #340: System frozen
gdImageCreate() doesn't check for oversized images and as such is pr... | 0 | 73,077 |
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 avg_tpel_pixels_mc12_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){
int i,j;
for (i=0; i < height; i++) {
for (j=0; j < width; j++) {
dst[j] = (dst[j] + ((2731*(3*src[j] + 2*src[j+1] + 4*src[j+stride] + 3*src[j+stride+1] + 6)) >> 15) + 1) >> 1;
... | 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: void BaseArena::RemoveAllPages() {
ClearFreeLists();
DCHECK(SweepingCompleted());
while (first_page_) {
BasePage* page = first_page_;
page->Unlink(&first_page_);
page->RemoveFromHeap();
}
}
Commit Message: [oilpan] Fix GCInfoTable for multiple threads
Previously, grow and access from differ... | 0 | 153,741 |
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 btif_dispatch_sm_event(btif_av_sm_event_t event, void* p_data, int len) {
/* Switch to BTIF context */
btif_transfer_context(btif_av_handle_event, event, (char*)p_data, len, NULL);
}
Commit Message: DO NOT MERGE AVRC: Copy browse.p_browse_data in btif_av_event_deep_copy
p_msg_src->browse.p_browse_data i... | 0 | 163,234 |
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 tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
void *frame, struct net_device *dev, void *data, int tp_len,
__be16 proto, unsigned char *addr, int hlen, int copylen,
const struct sockcm_cookie *sockc)
{
union tpacket_uhdr ph;
int to_write, offset, len, nr_frags, len_max;
struct ... | 0 | 49,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: perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
{
flushw_user();
if (test_thread_flag(TIF_32BIT))
perf_callchain_user_32(entry, regs);
else
perf_callchain_user_64(entry, regs);
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi p... | 0 | 25,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: size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict)
{
if (cdict==NULL) return 0; /* support sizeof on NULL */
DEBUGLOG(5, "sizeof(*cdict) : %u", (U32)sizeof(*cdict));
return cdict->workspaceSize + (cdict->dictBuffer ? cdict->dictContentSize : 0) + sizeof(*cdict);
}
Commit Message: fixed T36302429
CWE... | 0 | 90,119 |
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 Cluster::CreateBlock(long long id,
long long pos, // absolute pos of payload
long long size, long long discard_padding) {
assert((id == 0x20) || (id == 0x23)); // BlockGroup or SimpleBlock
if (m_entries_count < 0) { // haven't parsed anything yet
assert(m_entries == NULL);
assert(m_entries_si... | 1 | 173,805 |
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: OMX_ERRORTYPE SimpleSoftOMXComponent::internalSetParameter(
OMX_INDEXTYPE index, const OMX_PTR params) {
switch (index) {
case OMX_IndexParamPortDefinition:
{
OMX_PARAM_PORTDEFINITIONTYPE *defParams =
(OMX_PARAM_PORTDEFINITIONTYPE *)params;
if (defParams->n... | 1 | 174,223 |
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 store_item_type do_store_item(item *it, int comm, conn *c) {
char *key = ITEM_key(it);
item *old_it = do_item_get(key, it->nkey);
enum store_item_type stored = NOT_STORED;
item *new_it = NULL;
int flags;
if (old_it != NULL && comm == NREAD_ADD) {
/* add only adds a nonexiste... | 0 | 18,249 |
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 status_t ConvertOmxAvcLevelToAvcSpecLevel(
OMX_U32 omxLevel, AVCLevel *avcLevel) {
for (size_t i = 0, n = sizeof(ConversionTable)/sizeof(ConversionTable[0]);
i < n; ++i) {
if (omxLevel == ConversionTable[i].omxLevel) {
*avcLevel = ConversionTable[i].avcLevel;
return OK;
}
}
ALOGE... | 0 | 163,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: error::Error GLES2DecoderPassthroughImpl::DoGetProgramResourceLocation(
GLuint program,
GLenum program_interface,
const char* name,
GLint* location) {
*location = api()->glGetProgramResourceLocationFn(
GetProgramServiceID(program, resources_), program_interface, name);
return error::kNoE... | 0 | 142,005 |
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_indented_camera_metadata(const camera_metadata_t *metadata,
int fd,
int verbosity,
int indentation) {
if (metadata == NULL) {
dprintf(fd, "%*sDumping camera metadata array: Not allocated\n",
indentation, "");
return;
}
unsigned int i;
dprintf(fd,
"%*sDumping camera me... | 0 | 157,925 |
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: pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
{
struct pcap_ng_sf *ps = p->priv;
struct block_cursor cursor;
int status;
struct enhanced_packet_block *epbp;
struct simple_packet_block *spbp;
struct packet_block *pbp;
bpf_u_int32 interface_id = 0xFFFFFFFF;
struct interface_descript... | 0 | 88,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: labellen(netdissect_options *ndo,
const u_char *cp)
{
register u_int i;
if (!ND_TTEST2(*cp, 1))
return(-1);
i = *cp;
if ((i & INDIR_MASK) == EDNS0_MASK) {
int bitlen, elt;
if ((elt = (i & ~INDIR_MASK)) != EDNS0_ELT_BITLABEL) {
ND_PRINT((ndo, "<ELT %d>", elt));
return(-1);
}
if (!ND_T... | 0 | 62,490 |
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 AudioHandler::InputsAreSilent() {
for (auto& input : inputs_) {
if (!input->Bus()->IsSilent())
return false;
}
return true;
}
Commit Message: Revert "Keep AudioHandlers alive until they can be safely deleted."
This reverts commit 071df33edf2c8b4375fa432a83953359f93ea9e4.
Reason for revert:... | 0 | 148,813 |
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 nfc_dev *__get_device_from_cb(struct netlink_callback *cb)
{
struct nlattr **attrbuf = genl_family_attrbuf(&nfc_genl_family);
struct nfc_dev *dev;
int rc;
u32 idx;
rc = nlmsg_parse_deprecated(cb->nlh,
GENL_HDRLEN + nfc_genl_family.hdrsize,
attrbuf, nfc_genl_family.maxattr,
... | 0 | 89,425 |
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::MaybeQueueSendDidEditFieldInInsecureContext() {
if (logged_field_edit_ || sensitive_input_edited_task_.IsActive() ||
IsSecureContext()) {
return;
}
logged_field_edit_ = true;
sensitive_input_edited_task_ =
GetTaskRunner(TaskType::kUserInteraction)
->PostCancellable... | 0 | 146,763 |
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 pte_list_remove(u64 *spte, unsigned long *pte_list)
{
struct pte_list_desc *desc;
struct pte_list_desc *prev_desc;
int i;
if (!*pte_list) {
printk(KERN_ERR "pte_list_remove: %p 0->BUG\n", spte);
BUG();
} else if (!(*pte_list & 1)) {
rmap_printk("pte_list_remove: %p 1->0\n", spte);
if ((... | 0 | 37,572 |
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 LayerTreeHostImpl::ActivationStateAsValueInto(
base::trace_event::TracedValue* state) const {
TracedValue::SetIDRef(this, state, "lthi");
state->BeginDictionary("tile_manager");
tile_manager_.BasicStateAsValueInto(state);
state->EndDictionary();
}
Commit Message: (Reland) Discard compositor fram... | 0 | 137,204 |
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 dump_stack_segment(
Backtrace* backtrace, log_t* log, uintptr_t* sp, size_t words, int label) {
for (size_t i = 0; i < words; i++) {
word_t stack_content;
if (!backtrace->ReadWord(*sp, &stack_content)) {
break;
}
const backtrace_map_t* map = backtrace->FindMap(stack_content);
const char* map_... | 0 | 161,272 |
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 HTMLInputElement::SelectColorInColorChooser(const Color& color) {
if (ColorChooserClient* client = input_type_->GetColorChooserClient())
client->DidChooseColor(color);
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables s... | 0 | 126,091 |
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 addr_t* MACH0_(get_entrypoint)(struct MACH0_(obj_t)* bin) {
struct addr_t *entry;
int i;
if (!bin->entry && !bin->sects) {
return NULL;
}
if (!(entry = calloc (1, sizeof (struct addr_t)))) {
return NULL;
}
if (bin->entry) {
entry->addr = entry_to_vaddr (bin);
entry->offset = addr_to_offset ... | 0 | 82,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: network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address,
int port)
{
/* socks4 protocol is explained here: http://en.wikipedia.org/wiki/SOCKS */
struct t_network_socks4 socks4;
unsigned char buffer[24];
char ip_addr[NI_MAXHOST];
socks4... | 0 | 3,461 |
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* CurvesDup(cmsContext ContextID, const void* ptr)
{
Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data));
int i;
if (Data == NULL) return NULL;
Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*));
for (i=0; i < Data -> nCurve... | 0 | 41,008 |
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: raptor_object_options_copy_state(raptor_object_options* to,
raptor_object_options* from)
{
int rc = 0;
int i;
to->area = from->area;
for(i = 0; !rc && i <= RAPTOR_OPTION_LAST; i++) {
if(raptor_option_value_is_numeric((raptor_option)i))
to->options[i].integer =... | 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: bool IsLoadedAsMHTMLArchive(LocalFrame* local_frame) {
return local_frame && local_frame->GetDocument()->Fetcher()->Archive();
}
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 ... | 0 | 145,291 |
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 pdf_delete(pdf_t *pdf)
{
int i;
for (i=0; i<pdf->n_xrefs; i++)
{
free(pdf->xrefs[i].creator);
free(pdf->xrefs[i].entries);
free(pdf->xrefs[i].kids);
}
free(pdf->name);
free(pdf->xrefs);
free(pdf);
}
Commit Message: Zero and sanity check all dynamic alloc... | 0 | 88,597 |
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 throwPresentationDisconnectedError(ExceptionState& exceptionState) {
exceptionState.throwDOMException(InvalidStateError,
"Presentation connection is disconnected.");
}
Commit Message: [Presentation API] Add layout test for connection.close() and fix test failures
Add la... | 0 | 129,565 |
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 NTP() {
PolicyMap policies;
policies.Set(
key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
base::WrapUnique(new base::Value(SessionStartupPref::kPrefValueNewTab)),
nullptr);
provider_.UpdateChromePolicy(policies);
expect... | 0 | 157,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 int cm_init_qp_rts_attr(struct cm_id_private *cm_id_priv,
struct ib_qp_attr *qp_attr,
int *qp_attr_mask)
{
unsigned long flags;
int ret;
spin_lock_irqsave(&cm_id_priv->lock, flags);
switch (cm_id_priv->id.state) {
/* Allow transition to RTS before sending REP */
case IB_CM_REQ_RC... | 0 | 38,395 |
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 ftrace_function_set_filter(struct perf_event *event,
struct event_filter *filter)
{
struct prog_entry *prog = rcu_dereference_protected(filter->prog,
lockdep_is_held(&event_mutex));
struct function_filter_data data = {
.first_filter = 1,
.first_notrace = 1,
.ops = &ev... | 0 | 81,584 |
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::FrameRectsChanged(const IntRect& frame_rect) {
DCHECK(web_frame_->Client());
web_frame_->Client()->FrameRectsChanged(frame_rect);
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be able to c... | 0 | 145,277 |
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::ProvideInput(
AudioBus* bus,
size_t frames_to_process) {
DCHECK(bus);
MutexTryLocker try_locker(provide_input_lock);
if (!try_locker.Locked() || !web_audio_source_provider_ || !client_.Get()) {
bus->Zero();
return;
}
unsigned n = bus->Num... | 0 | 144,575 |
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 op_attr_bignum_clear(void *attr)
{
struct bignum **bn = attr;
crypto_bignum_clear(*bn);
}
Commit Message: svc: check for allocation overflow in crypto calls part 2
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that ... | 0 | 86,837 |
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 pmcraid_release_buffers(struct pmcraid_instance *pinstance)
{
pmcraid_release_config_buffers(pinstance);
pmcraid_release_control_blocks(pinstance, PMCRAID_MAX_CMD);
pmcraid_release_cmd_blocks(pinstance, PMCRAID_MAX_CMD);
pmcraid_release_host_rrqs(pinstance, pinstance->num_hrrq);
if (pinstance->i... | 0 | 26,491 |
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: Session(TargetHandler* handler,
DevToolsAgentHost* agent_host,
const std::string& id)
: handler_(handler), agent_host_(agent_host), id_(id) {}
Commit Message: DevTools: speculative fix for crash in NetworkHandler::Disable
This keeps BrowserContext* and StoragePartition* instead of
Re... | 0 | 148,671 |
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 GpuDataManager::UpdateGpuBlacklist(
GpuBlacklist* gpu_blacklist, bool preliminary) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(gpu_blacklist);
scoped_ptr<GpuBlacklist> updated_list(gpu_blacklist);
uint16 updated_version_major, updated_version_minor;
if (!updated_list->GetV... | 0 | 98,440 |
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: nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
struct nfsd4_fallocate *fallocate)
{
DECODE_HEAD;
status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid);
if (status)
return status;
READ_BUF(16);
p = xdr_decode_hyper(p, &fallocate->falloc_offset);
xdr_decode_hyper(p, &fallocate-... | 0 | 65,746 |
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 cqspi_configure(struct spi_nor *nor)
{
struct cqspi_flash_pdata *f_pdata = nor->priv;
struct cqspi_st *cqspi = f_pdata->cqspi;
const unsigned int sclk = f_pdata->clk_rate;
int switch_cs = (cqspi->current_cs != f_pdata->cs);
int switch_ck = (cqspi->sclk != sclk);
if ((cqspi->current_page_size !=... | 0 | 93,662 |
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::OnDeleteSurroundingTextInCodePoints(int before,
int after) {
ImeEventGuard guard(GetRenderWidget());
frame_->DeleteSurroundingTextInCodePoints(before, after);
}
Commit Message: If a page calls |window.focus()|, kick it out of ful... | 0 | 147,843 |
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: CHANNELINDEX CSoundFile::CheckNNA(CHANNELINDEX nChn, uint32 instr, int note, bool forceCut)
{
CHANNELINDEX nnaChn = CHANNELINDEX_INVALID;
ModChannel &srcChn = m_PlayState.Chn[nChn];
const ModInstrument *pIns = nullptr;
if(!ModCommand::IsNote(static_cast<ModCommand::NOTE>(note)))
{
return nnaChn;
}
if((!(... | 0 | 83,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: double tdiff(struct timeval *end, struct timeval *start)
{
return end->tv_sec - start->tv_sec + (end->tv_usec - start->tv_usec) / 1000000.0;
}
Commit Message: stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Shoul... | 0 | 36,631 |
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: map_screen_to_layer(int layer, int camera_x, int camera_y, int* inout_x, int* inout_y)
{
rect_t bounds;
int center_x;
int center_y;
int layer_h;
int layer_w;
float plx_offset_x = 0.0;
int plx_offset_y = 0.0;
size2_t resolution;
int tile_w;
int tile_h;
int x_offset;
i... | 0 | 75,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: v8::Local<v8::Context> V8SchemaRegistry::GetOrCreateContext(
v8::Isolate* isolate) {
if (!context_holder_) {
context_holder_.reset(new gin::ContextHolder(isolate));
context_holder_->SetContext(v8::Context::New(isolate));
schema_cache_.reset(new SchemaCache(isolate));
return context_holder_->... | 0 | 132,701 |
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 sfile_write(jas_stream_obj_t *obj, char *buf, int cnt)
{
FILE *fp;
size_t n;
JAS_DBGLOG(100, ("sfile_write(%p, %p, %d)\n", obj, buf, cnt));
fp = JAS_CAST(FILE *, obj);
n = fwrite(buf, 1, cnt, fp);
return (n != JAS_CAST(size_t, cnt)) ? (-1) : cnt;
}
Commit Message: The generation of the configura... | 0 | 72,809 |
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: TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
{
if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
return ((tmsize_t)(-1));
return (TIFFReadEncodedTile(tif,
TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
}
Commit Message: * libtiff/tif_read.c, libtiff/t... | 0 | 70,341 |
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 snd_pcm_debug_name(struct snd_pcm_substream *substream,
char *name, size_t len)
{
snprintf(name, len, "pcmC%dD%d%c:%d",
substream->pcm->card->number,
substream->pcm->device,
substream->stream ? 'c' : 'p',
substream->number);
}
Commit Message: ALSA: pcm : Call kill_fasync() in stream lock
... | 0 | 47,804 |
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_context_time(struct perf_event_context *ctx)
{
u64 now = perf_clock();
ctx->time += now - ctx->timestamp;
ctx->timestamp = now;
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current
cont... | 0 | 26,223 |
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 NaClProcessHost::OnChannelConnected(int32 peer_pid) {
if (!CommandLine::ForCurrentProcess()->GetSwitchValuePath(
switches::kNaClGdb).empty()) {
base::ProcessHandle process;
DCHECK(process_->GetData().handle == base::kNullProcessHandle);
if (base::OpenProcessHandleWithAccess(
... | 0 | 103,267 |
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 TabStripGtk::IsTabActive(const TabGtk* tab) const {
if (tab->closing())
return false;
return GetIndexOfTab(tab) == model_->active_index();
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.apps... | 0 | 118,123 |
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 BrowserView::ExitFullscreen() {
if (!IsFullscreen())
return; // Nothing to do.
ProcessFullscreen(false, FOR_DESKTOP, GURL(), FEB_TYPE_NONE);
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.a... | 0 | 118,326 |
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 unsigned int snd_ctl_poll(struct file *file, poll_table * wait)
{
unsigned int mask;
struct snd_ctl_file *ctl;
ctl = file->private_data;
if (!ctl->subscribed)
return 0;
poll_wait(file, &ctl->change_sleep, wait);
mask = 0;
if (!list_empty(&ctl->events))
mask |= POLLIN | POLLRDNORM;
return mas... | 0 | 36,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: void CompositedLayerRasterInvalidator::AddDisplayItemRasterInvalidations(
const PaintArtifact& paint_artifact,
const PaintChunk& chunk,
const ChunkToLayerMapper& mapper) {
const auto* rects = paint_artifact.GetRasterInvalidationRects(chunk);
if (!rects || rects->IsEmpty())
return;
const aut... | 0 | 125,492 |
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: show_usage(char *name)
{
char *s;
s = strrchr(name, '/');
s = s ? s+1 : name;
printf("picocom v%s\n", VERSION_STR);
printf("\nCompiled-in options:\n");
printf(" TTY_Q_SZ is %d\n", TTY_Q_SZ);
#ifdef USE_HIGH_BAUD
printf(" HIGH_BAUD is enabled\n");
#endif
#ifdef USE_FLOCK
printf(" USE_FLOCK is enabled... | 0 | 73,989 |
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 InitializeWithHTML(LocalFrame& frame, const String& html_content) {
frame.GetDocument()->body()->SetInnerHTMLFromString(html_content);
frame.GetDocument()->View()->UpdateAllLifecyclePhases(
DocumentLifecycle::LifecycleUpdateReason::kTest);
}
Commit Message: [BGPT] Add a fast-path for tra... | 0 | 140,115 |
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 mailimf_unstructured_parse(const char * message, size_t length,
size_t * indx, char ** result)
{
size_t cur_token;
int state;
size_t begin;
size_t terminal;
char * str;
cur_token = * indx;
while (1) {
int r;
r = mailimf_wsp_parse(message, length, &cur_token);
if ... | 0 | 66,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: RenderWidgetHostImpl* WebContentsImpl::GetRenderWidgetHostWithPageFocus() {
WebContentsImpl* focused_web_contents = GetFocusedWebContents();
if (focused_web_contents->ShowingInterstitialPage()) {
return static_cast<RenderFrameHostImpl*>(
focused_web_contents->GetRenderManager()
... | 0 | 135,733 |
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: GfxLabColorSpace::GfxLabColorSpace() {
whiteX = whiteY = whiteZ = 1;
blackX = blackY = blackZ = 0;
aMin = bMin = -100;
aMax = bMax = 100;
}
Commit Message:
CWE ID: CWE-189 | 0 | 960 |
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 tg3_phy_copper_begin(struct tg3 *tp)
{
if (tp->link_config.autoneg == AUTONEG_ENABLE ||
(tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) {
u32 adv, fc;
if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) {
adv = ADVERTISED_10baseT_Half |
ADVERTISED_10baseT_Full;
if (tg3_flag(tp, WOL_SPEED... | 0 | 32,653 |
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 sfile_seek(jas_stream_obj_t *obj, long offset, int origin)
{
FILE *fp;
JAS_DBGLOG(100, ("sfile_seek(%p, %ld, %d)\n", obj, offset, origin));
fp = JAS_CAST(FILE *, obj);
return fseek(fp, offset, origin);
}
Commit Message: The generation of the configuration file jas_config.h has been completely
rew... | 0 | 72,808 |
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 VRDisplay::OnExitPresent() {
StopPresenting();
}
Commit Message: WebVR: fix initial vsync
Applications sometimes use window.rAF while not presenting, then switch to
vrDisplay.rAF after presentation starts. Depending on the animation loop's
timing, this can cause a race condition where presentation has be... | 0 | 128,362 |
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: piv_pin_cmd(sc_card_t *card, struct sc_pin_cmd_data *data, int *tries_left)
{
int r = 0;
piv_private_data_t * priv = PIV_DATA(card);
/* Extra validation of (new) PIN during a PIN change request, to
* ensure it's not outside the FIPS 201 4.1.6.1 (numeric only) and
* FIPS 140-2 (6 character minimum) require... | 0 | 78,647 |
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 SelectionEditor::DidMergeTextNodes(
const Text& merged_node,
const NodeWithIndex& node_to_be_removed_with_index,
unsigned old_length) {
if (selection_.IsNone()) {
DidFinishDOMMutation();
return;
}
const Position& new_base = UpdatePostionAfterAdoptingTextNodesMerged(
selection_... | 0 | 124,958 |
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: AuthenticatorBlePowerOnAutomaticSheetModel::GetStepIllustration(
ImageColorScheme color_scheme) const {
return color_scheme == ImageColorScheme::kDark
? kWebauthnErrorBluetoothDarkIcon
: kWebauthnErrorBluetoothIcon;
}
Commit Message: chrome/browser/ui/webauthn: long domains may ca... | 0 | 142,901 |
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: expand_gettokened (int field, uschar *separators, uschar *s)
{
int sep = 1;
int count;
uschar *ss = s;
uschar *fieldtext = NULL;
if (field == 0) return s;
/* Break the line up into fields in place; for field > 0 we stop when we have
done the number of fields we want. For field < 0 we continue till the end of
th... | 0 | 12,658 |
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: const btav_sink_interface_t* btif_av_get_sink_interface(void) {
BTIF_TRACE_EVENT("%s", __func__);
return &bt_av_sink_interface;
}
Commit Message: DO NOT MERGE AVRC: Copy browse.p_browse_data in btif_av_event_deep_copy
p_msg_src->browse.p_browse_data is not copied, but used after the
original pointer is freed... | 0 | 163,217 |
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_accept_path_info(cmd_parms *cmd, void *d_, const char *arg)
{
core_dir_config *d = d_;
if (ap_cstr_casecmp(arg, "on") == 0) {
d->accept_path_info = AP_REQ_ACCEPT_PATH_INFO;
}
else if (ap_cstr_casecmp(arg, "off") == 0) {
d->accept_path_info = AP_REQ_REJECT_PA... | 0 | 64,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: ChromeContentBrowserClient::GetOriginPolicyErrorPage(
content::OriginPolicyErrorReason error_reason,
const url::Origin& origin,
const GURL& url) {
return security_interstitials::OriginPolicyUI::GetErrorPage(error_reason,
origin, url);
}
... | 0 | 152,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: static void cxusb_d680_dmb_drain_video(struct dvb_usb_device *d)
{
struct usb_data_stream_properties *p = &d->props.adapter[0].fe[0].stream;
const int timeout = 100;
const int junk_len = p->u.bulk.buffersize;
u8 *junk;
int rd_count;
/* Discard remaining data in video pipe */
junk = kmalloc(ju... | 0 | 66,715 |
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: session_env_req(Session *s)
{
char *name, *val;
u_int name_len, val_len, i;
name = packet_get_cstring(&name_len);
val = packet_get_cstring(&val_len);
packet_check_eom();
/* Don't set too many environment variables */
if (s->num_env > 128) {
debug2("Ignoring env request %s: too many env vars", name);
... | 0 | 14,414 |
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 ChromeClientImpl::HadFormInteraction() const {
return web_view_->PageImportanceSignals() &&
web_view_->PageImportanceSignals()->HadFormInteraction();
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8... | 0 | 148,152 |
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 MagickBooleanType TraceEllipse(MVGInfo *mvg_info,const PointInfo center,
const PointInfo radii,const PointInfo arc)
{
double
coordinates,
delta,
step,
x,
y;
PointInfo
angle,
point;
PrimitiveInfo
*primitive_info;
register PrimitiveInfo
*p;
register ssize_t... | 0 | 87,290 |
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 rectangles_equal(const RECTANGLE_16* r1, const RECTANGLE_16* r2)
{
return ((r1->left == r2->left) && (r1->top == r2->top) &&
(r1->right == r2->right) && (r1->bottom == r2->bottom)) ? TRUE : FALSE;
}
Commit Message: Fixed #5645: realloc return handling
CWE ID: CWE-772 | 0 | 87,405 |
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: Bcj2_Decode(struct _7zip *zip, uint8_t *outBuf, size_t outSize)
{
size_t inPos = 0, outPos = 0;
const uint8_t *buf0, *buf1, *buf2, *buf3;
size_t size0, size1, size2, size3;
const uint8_t *buffer, *bufferLim;
unsigned int i, j;
size0 = zip->tmp_stream_bytes_remaining;
buf0 = zip->tmp_stream_buff + zip->tmp... | 0 | 53,532 |
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: LogStateSaver() : old_min_log_level_(logging::GetMinLogLevel()) {}
Commit Message: Remove UMA.CreatePersistentHistogram.Result
This histogram isn't showing anything meaningful and the problems it
could show are better observed by looking at the allocators directly.
Bug: 831013
Change-Id: Ibe968597758230192e5... | 0 | 131,149 |
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* Type_Text_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return (void*) cmsMLUdup((cmsMLU*) Ptr);
cmsUNUSED_PARAMETER(n);
cmsUNUSED_PARAMETER(self);
}
Commit Message: Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug
CWE ID: CW... | 0 | 71,060 |
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: ScopedGLErrorSuppressor::ScopedGLErrorSuppressor(
const char* function_name, ErrorState* error_state)
: function_name_(function_name),
error_state_(error_state) {
ERRORSTATE_COPY_REAL_GL_ERRORS_TO_WRAPPER(error_state_, function_name_);
}
Commit Message: Framebuffer clear() needs to consider the s... | 0 | 121,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 ReverbSetDecayHfRatio(ReverbContext *pContext, int16_t ratio){
LVREV_ControlParams_st ActiveParams; /* Current control Parameters */
LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */
/* Get the current settings */
LvmStatus = LVREV_GetControlParameters(pContext->hIn... | 0 | 157,439 |
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::DetailsGroup* AutofillDialogViews::GroupForView(
views::View* view) {
DCHECK(view);
views::View* input_view = GetAncestralInputView(view);
if (!input_view)
return NULL;
for (DetailGroupMap::iterator iter = detail_groups_.begin();
iter != detail_groups_.end(); ++iter) ... | 0 | 109,990 |
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: ~ScopedBrowserShower() {
if (params_->window_action == NavigateParams::SHOW_WINDOW_INACTIVE) {
params_->browser->window()->ShowInactive();
} else if (params_->window_action == NavigateParams::SHOW_WINDOW) {
BrowserWindow* window = params_->browser->window();
window->Show();
if (p... | 0 | 155,137 |
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: virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk,
virDomainBlockJobInfoPtr info, unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(dom, "disk=%s, info=%p, flags=%x", disk, info, flags);
virResetLastError();
if (info)
memset(info, 0, sizeof(*i... | 0 | 93,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: static void __exit aac_exit(void)
{
if (aac_cfg_major > -1)
unregister_chrdev(aac_cfg_major, "aac");
pci_unregister_driver(&aac_pci_driver);
}
Commit Message: aacraid: missing capable() check in compat ioctl
In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO t... | 0 | 28,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: PluginChannel::PluginChannel()
: renderer_handle_(0),
renderer_id_(-1),
in_send_(0),
incognito_(false),
filter_(new MessageFilter()) {
set_send_unblocking_only_during_unblock_dispatch();
ChildProcess::current()->AddRefProcess();
const CommandLine* command_line = CommandLine::... | 1 | 170,950 |
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 BrowserGpuChannelHostFactory::GpuChannelEstablishedOnIO(
EstablishRequest* request,
const IPC::ChannelHandle& channel_handle,
base::ProcessHandle gpu_process_handle,
const GPUInfo& gpu_info) {
request->channel_handle = channel_handle;
request->gpu_process_handle = gpu_process_handle;... | 1 | 170,919 |
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 gen_cmovcc1(CPUX86State *env, DisasContext *s, TCGMemOp ot, int b,
int modrm, int reg)
{
CCPrepare cc;
gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0);
cc = gen_prepare_cc(s, b, cpu_T1);
if (cc.mask != -1) {
TCGv t0 = tcg_temp_new();
tcg_gen_andi... | 0 | 66,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 WebContentsImpl::DownloadImage(
const GURL& url,
bool is_favicon,
uint32_t max_bitmap_size,
bool bypass_cache,
const WebContents::ImageDownloadCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
static int next_image_download_id = 0;
const content::mojom::ImageDownloaderPtr... | 0 | 135,685 |
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 * CLASS foveon_camf_matrix (unsigned dim[3], const char *name)
{
unsigned i, idx, type, ndim, size, *mat;
char *pos, *cp, *dp;
double dsize;
for (idx=0; idx < meta_length; idx += sget4(pos+8)) {
pos = meta_data + idx;
if (strncmp (pos, "CMb", 3)) break;
if (pos[3] != 'M') continue;
i... | 0 | 67,883 |
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 WebPage::spellCheckingRequestCancelled(int32_t transactionId)
{
d->m_inputHandler->spellCheckingRequestCancelled(transactionId);
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Reviewed by Rob Buis.
Internally... | 0 | 104,438 |
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 ip_tunnel * ipgre_tunnel_locate(struct net *net,
struct ip_tunnel_parm *parms, int create)
{
struct ip_tunnel *t, *nt;
struct net_device *dev;
char name[IFNAMSIZ];
struct ipgre_net *ign = net_generic(net, ipgre_net_id);
t = ipgre_tunnel_find(net, parms, ARPHRD_IPGRE);
if (t || !create)
re... | 0 | 27,504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.