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: void RenderBox::autoscroll()
{
if (layer())
layer()->autoscroll();
}
Commit Message: Source/WebCore: Fix for bug 64046 - Wrong image height in absolutely positioned div in
relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bug.cgi?id=64046
Patch by Kulanthaivel Palanicham... | 0 | 101,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: static void dummy_smi_done_handler(struct ipmi_smi_msg *msg)
{
atomic_dec(&panic_done_count);
}
Commit Message: ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
-----... | 0 | 91,230 |
Analyze the following 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 AreSchemesEqual(const char* base,
const url_parse::Component& base_scheme,
const CHAR* cmp,
const url_parse::Component& cmp_scheme) {
if (base_scheme.len != cmp_scheme.len)
return false;
for (int i = 0; i < base_scheme.len; i++) {
if ... | 0 | 111,698 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void cexp(JF, js_Ast *exp)
{
int then, end;
int n;
switch (exp->type) {
case EXP_STRING:
emitline(J, F, exp);
emitstring(J, F, OP_STRING, exp->string);
break;
case EXP_NUMBER:
emitline(J, F, exp);
emitnumber(J, F, exp->number);
break;
case EXP_UNDEF:
emitline(J, F, exp);
emit(J, F, O... | 0 | 90,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: UserSelectionScreen::UpdateAndReturnUserListForWebUI() {
std::unique_ptr<base::ListValue> users_list =
std::make_unique<base::ListValue>();
const AccountId owner = GetOwnerAccountId();
const bool is_signin_to_add = IsSigninToAdd();
users_to_send_ = PrepareUserListForSending(users_, owner, is_signi... | 1 | 172,205 |
Analyze the following 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 char *decode_text_string(const char *str, size_t str_len)
{
int idx, is_hex, is_utf16be, ascii_idx;
char *ascii, hex_buf[5] = {0};
is_hex = is_utf16be = idx = ascii_idx = 0;
/* Regular encoding */
if (str[0] == '(')
{
ascii = malloc(strlen(str) + 1);
strncpy(... | 1 | 169,566 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pdf_drop_xobject_imp(fz_context *ctx, fz_storable *xobj_)
{
pdf_xobject *xobj = (pdf_xobject *)xobj_;
pdf_drop_obj(ctx, xobj->obj);
fz_free(ctx, xobj);
}
Commit Message:
CWE ID: CWE-20 | 0 | 602 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rsa_decrypt (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
{
gpg_err_code_t rc;
struct pk_encoding_ctx ctx;
gcry_sexp_t l1 = NULL;
gcry_mpi_t data = NULL;
RSA_secret_key sk = {NULL, NULL, NULL, NULL, NULL, NULL};
gcry_mpi_t plain = NULL;
unsigned char *unpad = NULL;
size_t unpad... | 0 | 17,834 |
Analyze the following 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 may_delete(struct inode *dir, struct dentry *victim, bool isdir)
{
struct inode *inode = d_backing_inode(victim);
int error;
if (d_is_negative(victim))
return -ENOENT;
BUG_ON(!inode);
BUG_ON(victim->d_parent->d_inode != dir);
audit_inode_child(dir, victim, AUDIT_TYPE_CHILD_DELETE);
error = ... | 0 | 67,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: void WebPage::onCertificateStoreLocationSet(const BlackBerry::Platform::String& caPath)
{
#if ENABLE(VIDEO)
MediaPlayerPrivate::setCertificatePath(caPath);
#endif
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Rev... | 0 | 104,313 |
Analyze the following 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 RTCPeerConnection::didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor> iceCandidateDescriptor)
{
ASSERT(scriptExecutionContext()->isContextThread());
if (!iceCandidateDescriptor)
dispatchEvent(RTCIceCandidateEvent::create(false, false, 0));
else {
RefPtr<RTCIceCandidate>... | 0 | 99,367 |
Analyze the following 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 Pack<WebGLImageConversion::kDataFormatR32F,
WebGLImageConversion::kAlphaDoUnmultiply,
float,
float>(const float* source,
float* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
float scale_factor = so... | 0 | 146,690 |
Analyze the following 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 OnComplete(int result) {
delete cache_;
SetResult(result);
}
Commit Message: Http cache: Test deleting an entry with a pending_entry when
adding the truncated flag.
BUG=125159
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/10356113
git-svn-id: svn://svn.chromium.org/chro... | 0 | 108,106 |
Analyze the following 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 add_pfn_range_mapped(unsigned long start_pfn, unsigned long end_pfn)
{
nr_pfn_mapped = add_range_with_merge(pfn_mapped, E820_X_MAX,
nr_pfn_mapped, start_pfn, end_pfn);
nr_pfn_mapped = clean_sort_range(pfn_mapped, E820_X_MAX);
max_pfn_mapped = max(max_pfn_mapped, end_pfn);
if (start_pfn... | 0 | 66,853 |
Analyze the following 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 spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type TSRMLS_DC)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(readobj TSRMLS_CC);
if (type == IS_STRING) {
if (Z_OBJCE_P(readobj)->__tostring) {
return std_object_handlers.cast_object(readobj,... | 0 | 51,349 |
Analyze the following 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 armv8pmu_start(void)
{
unsigned long flags;
struct pmu_hw_events *events = cpu_pmu->get_hw_events();
raw_spin_lock_irqsave(&events->pmu_lock, flags);
/* Enable all counters */
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMCR_E);
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
}
Comm... | 0 | 56,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: void WebLocalFrameImpl::ExtendSelectionAndDelete(int before, int after) {
TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
if (WebPlugin* plugin = FocusedPluginIfInputMethodSupported()) {
plugin->ExtendSelectionAndDelete(before, after);
return;
}
GetFrame()->GetDocument()->Up... | 0 | 134,298 |
Analyze the following 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 isCaretAtStartOfWrappedLine(const FrameSelection& selection) {
if (!selection.computeVisibleSelectionInDOMTreeDeprecated().isCaret())
return false;
if (selection.selectionInDOMTree().affinity() != TextAffinity::Downstream)
return false;
const Position& position =
selection.computeV... | 0 | 129,153 |
Analyze the following 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 GM2TabStyle::IsHoverActive() const {
if (!hover_controller_)
return false;
return hover_controller_->ShouldDraw();
}
Commit Message: Paint tab groups with the group color.
* The background of TabGroupHeader now uses the group color.
* The backgrounds of tabs in the group are tinted with the group c... | 0 | 140,835 |
Analyze the following 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 sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
const u8 *addr)
{
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)],
lockdep_is_held(&local->sta_mtx));
while (sta) {
if (sta->sdata == sdata &&
... | 0 | 38,589 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: FilterStream::FilterStream(Stream *strA) {
str = strA;
}
Commit Message:
CWE ID: CWE-119 | 0 | 3,903 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ProcXFixesCreateRegionFromGC(ClientPtr client)
{
RegionPtr pRegion, pClip;
GCPtr pGC;
int rc;
REQUEST(xXFixesCreateRegionFromGCReq);
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq);
LEGAL_NEW_RESOURCE(stuff->region, client);
rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAcces... | 0 | 17,681 |
Analyze the following 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 PHP_MINIT_FUNCTION(cgi)
{
#ifdef ZTS
ts_allocate_id(&php_cgi_globals_id, sizeof(php_cgi_globals_struct), (ts_allocate_ctor) php_cgi_globals_ctor, NULL);
#else
php_cgi_globals_ctor(&php_cgi_globals TSRMLS_CC);
#endif
REGISTER_INI_ENTRIES();
return SUCCESS;
}
Commit Message:
CWE ID: CWE-119 | 0 | 7,242 |
Analyze the following 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 char *sapi_fcgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
/* when php is started by mod_fastcgi, no regular environment
* is provided to PHP. It is always sent to PHP at the start
* of a request. So we have to do our own lookup to get env
* vars. This could probably be faster somehow. */
... | 0 | 7,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: png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
png_bytep rp = row;
png_bytep rp_stop = row + row_info->rowbytes;
png_const_bytep pp = prev_row;
for (; rp < rp_stop; rp += 16, pp += 16)
{
uint8x16_t qrp, qpp;
qrp = vld1q_u8(rp);
qpp = vld... | 0 | 159,767 |
Analyze the following 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 Append(int pos, int size) {
target_.Append(data_, data_->data() + pos, size);
}
Commit Message: iwyu: Include callback_old.h where appropriate, final.
BUG=82098
TEST=none
Review URL: http://codereview.chromium.org/7003003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85003 0039d316-1c4b-428... | 0 | 100,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: virtual int query(int what, int* value) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
data.writeInt32(what);
status_t result = remote()->transact(QUERY, data, &reply);
if (result != NO_ERROR) {
return result;
}
value[0] = reply.read... | 0 | 160,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: MagickExport void GetQuantizeInfo(QuantizeInfo *quantize_info)
{
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(quantize_info != (QuantizeInfo *) NULL);
(void) ResetMagickMemory(quantize_info,0,sizeof(*quantize_info));
quantize_info->number_colors=256;
quantize_info->dither=MagickTrue... | 0 | 62,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 GLES2DecoderImpl::DoVertexAttrib3fv(GLuint index, const GLfloat* v) {
VertexAttribManager::VertexAttribInfo* info =
vertex_attrib_manager_->GetVertexAttribInfo(index);
if (!info) {
SetGLError(GL_INVALID_VALUE, "glVertexAttrib3fv", "index out of range");
return;
}
VertexAttribManager::Ve... | 0 | 103,579 |
Analyze the following 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 ssize_t ib_ucm_init_qp_attr(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct ib_uverbs_qp_attr resp;
struct ib_ucm_init_qp_attr cmd;
struct ib_ucm_context *ctx;
struct ib_qp_attr qp_attr;
int result = 0;
if (out_len < sizeof(resp))
return -ENOSPC;... | 0 | 52,798 |
Analyze the following 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 sk_buff * pfkey_xfrm_policy2msg_prep(const struct xfrm_policy *xp)
{
struct sk_buff *skb;
int size;
size = pfkey_xfrm_policy2msg_size(xp);
skb = alloc_skb(size + 16, GFP_ATOMIC);
if (skb == NULL)
return ERR_PTR(-ENOBUFS);
return skb;
}
Commit Message: af_key: initialize satype in key_no... | 0 | 31,474 |
Analyze the following 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 jas_icctxt_copy(jas_iccattrval_t *attrval,
jas_iccattrval_t *othattrval)
{
jas_icctxt_t *txt = &attrval->data.txt;
jas_icctxt_t *othtxt = &othattrval->data.txt;
if (!(txt->string = jas_strdup(othtxt->string)))
return -1;
return 0;
}
Commit Message: The generation of the configuration file jas_... | 0 | 72,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: static void vfio_pci_remove(struct pci_dev *pdev)
{
struct vfio_pci_device *vdev;
vdev = vfio_del_group_dev(&pdev->dev);
if (!vdev)
return;
vfio_iommu_group_put(pdev->dev.iommu_group, &pdev->dev);
kfree(vdev->region);
kfree(vdev);
if (vfio_pci_is_vga(pdev)) {
vga_client_register(pdev, NULL, NULL, NU... | 0 | 48,600 |
Analyze the following 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 Ins_SWAP( INS_ARG )
{
Long L;
(void)exc;
L = args[0];
args[0] = args[1];
args[1] = L;
}
Commit Message:
CWE ID: CWE-125 | 0 | 5,467 |
Analyze the following 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 JSTestMediaQueryListListenerConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSTestMediaQueryListListenerConstructor, JSDOMWrapper>(exec, &JSTestMediaQueryListListenerConstructorTable, jsCast<JSTestMediaQueryLis... | 0 | 101,164 |
Analyze the following 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 phar_dir_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */
{
HashTable *data = (HashTable *)stream->abstract;
if (data && data->arBuckets) {
zend_hash_destroy(data);
data->arBuckets = 0;
FREE_HASHTABLE(data);
stream->abstract = NULL;
}
return 0;
}
/* }}} */
Commit Message:... | 0 | 176 |
Analyze the following 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::Vector2dF Layer::ScrollOffsetForAnimation() const {
return TotalScrollOffset();
}
Commit Message: Removed pinch viewport scroll offset distribution
The associated change in Blink makes the pinch viewport a proper
ScrollableArea meaning the normal path for synchronizing layer scroll
offsets is used.
This... | 0 | 111,892 |
Analyze the following 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 crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
{
struct skcipher_alg *skcipher = container_of(alg, struct skcipher_alg,
base);
seq_printf(m, "type : skcipher\n");
seq_printf(m, "async : %s\n",
alg->cra_flags & CRYPTO_ALG_ASYNC ? "yes" : "no");
seq... | 0 | 64,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 TracingControllerImpl::AddAgents() {
tracing::TracedProcessImpl::GetInstance()->SetTaskRunner(
base::SequencedTaskRunnerHandle::Get());
#if defined(OS_CHROMEOS)
agents_.push_back(std::make_unique<CrOSTracingAgent>());
#elif defined(CAST_TRACING_AGENT)
agents_.push_back(std::make_unique<CastTraci... | 0 | 130,180 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: HB_Error HB_GPOS_Apply_String( HB_Font font,
HB_GPOSHeader* gpos,
HB_UShort load_flags,
HB_Buffer buffer,
HB_Bool dvi,
HB_Bool r2l )
{
HB_Error error, retError = HB_Err_Not_Covered;
GPOS_Instance gpi;
int i, j, looku... | 0 | 13,557 |
Analyze the following 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 cx24116_cmd_execute(struct dvb_frontend *fe, struct cx24116_cmd *cmd)
{
struct cx24116_state *state = fe->demodulator_priv;
int i, ret;
dprintk("%s()\n", __func__);
/* Load the firmware if required */
ret = cx24116_firmware_ondemand(fe);
if (ret != 0) {
printk(KERN_ERR "%s(): Unable initialis... | 0 | 94,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: int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
const AVSubtitle *sub)
{
int ret;
if (sub->start_display_time) {
av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
return -1;
}
ret = avctx->codec->encode_sub(a... | 0 | 66,975 |
Analyze the following 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 async_chainiv_givencrypt(struct skcipher_givcrypt_request *req)
{
struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req);
struct async_chainiv_ctx *ctx = crypto_ablkcipher_ctx(geniv);
struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req);
ablkcipher_request_set_tfm(subreq, skc... | 0 | 45,602 |
Analyze the following 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::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
{
if (m_webView->client()) {
return m_webView->client()->runModalBeforeUnloadDialog(
WebFrameImpl::fromFrame(frame), message);
}
return false;
}
Commit Message: Delete apparently unused geoloca... | 0 | 118,641 |
Analyze the following 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 futex_proxy_trylock_atomic(u32 __user *pifutex,
struct futex_hash_bucket *hb1,
struct futex_hash_bucket *hb2,
union futex_key *key1, union futex_key *key2,
struct futex_pi_state **ps, int set_waiters)
{
struct futex_q *top_waiter = NULL;
u32 curval;
int ret;
if (get_futex_value... | 0 | 39,632 |
Analyze the following 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_keywords_parse(const char * message, size_t length,
size_t * indx,
struct mailimf_keywords ** result)
{
struct mailimf_keywords * keywords;
clist * list;
size_t cur_token;
int r;
int res;
cur_token = * indx;
r = mailimf_token_case_insensitive_parse(message, length,
... | 0 | 66,201 |
Analyze the following 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 GpuProcessHostUIShim::OnLogMessage(
int level,
const std::string& header,
const std::string& message) {
GpuDataManagerImpl::GetInstance()->AddLogMessage(
level, header, message);
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantag... | 0 | 114,463 |
Analyze the following 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 HTML_put_entity(HTStructured * me, int entity_number)
{
int nent = (int) HTML_dtd.number_of_entities;
if (entity_number < nent) {
HTML_put_string(me, p_entity_values[entity_number]);
return HT_OK;
}
return HT_CANNOT_TRANSLATE;
}
Commit Message: snapshot of project "lynx", label v2-8-9dev_1... | 0 | 59,009 |
Analyze the following 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 allowedOp(int op){
assert( TK_GT>TK_EQ && TK_GT<TK_GE );
assert( TK_LT>TK_EQ && TK_LT<TK_GE );
assert( TK_LE>TK_EQ && TK_LE<TK_GE );
assert( TK_GE==TK_EQ+4 );
return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL || op==TK_IS;
}
Commit Message: sqlite: safely move pointer values thro... | 0 | 136,295 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nf_tables_afinfo_lookup(struct net *net, int family, bool autoload)
{
struct nft_af_info *afi;
afi = nft_afinfo_lookup(net, family);
if (afi != NULL)
return afi;
#ifdef CONFIG_MODULES
if (autoload) {
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
request_module("nft-afinfo-%u", family);
nfnl_lock(NFNL_SUBSYS_NFT... | 0 | 57,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: void DXVAVideoDecodeAccelerator::NotifyResetDone() {
if (client_)
client_->NotifyResetDone();
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132303 0... | 0 | 106,938 |
Analyze the following 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::styleResolverChanged(RecalcStyleTime updateTime, StyleResolverUpdateMode updateMode)
{
if (!confusingAndOftenMisusedAttached() || (!m_didCalculateStyleResolver && !haveStylesheetsLoaded())) {
m_styleResolver.clear();
return;
}
m_didCalculateStyleResolver = true;
boo... | 0 | 102,896 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScopedTextureBinder::~ScopedTextureBinder() {
ScopedGLErrorSuppressor suppressor(
"ScopedTextureBinder::dtor", state_->GetErrorState());
RestoreCurrentTextureBindings(state_, target_, 0);
state_->RestoreActiveTexture();
}
Commit Message: Implement immutable texture base/max level clamping
It seems s... | 0 | 145,945 |
Analyze the following 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 dn_device_event(struct notifier_block *this, unsigned long event,
void *ptr)
{
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
if (!net_eq(dev_net(dev), &init_net))
return NOTIFY_DONE;
switch (event) {
case NETDEV_UP:
dn_dev_up(dev);
break;
case NETDEV_DOWN:
dn_dev_down(... | 0 | 41,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 GLES2DecoderImpl::RestoreTextureState(unsigned service_id) const {
Texture* texture = texture_manager()->GetTextureForServiceId(service_id);
if (texture) {
GLenum target = texture->target();
glBindTexture(target, service_id);
glTexParameteri(
target, GL_TEXTURE_WRAP_S, texture->wrap_s... | 0 | 121,027 |
Analyze the following 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 checkPage(PgHdr *pPg){
Pager *pPager = pPg->pPager;
assert( pPager->eState!=PAGER_ERROR );
assert( (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );
}
Commit Message: sqlite: safely move pointer values through SQL.
This lands https://www.sqlite.org/src/timeline?c=d6a44b35 in
th... | 0 | 136,384 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: KURL Document::urlForBinding() const {
if (!Url().IsNull()) {
return Url();
}
return BlankURL();
}
Commit Message: Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutU... | 0 | 130,004 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlNsPtr attr_find_ns(xmlAttrPtr node)
{
if (node->ns) {
return node->ns;
} else if (node->parent->ns) {
return node->parent->ns;
} else {
return xmlSearchNs(node->doc, node->parent, NULL);
}
}
Commit Message:
CWE ID: CWE-200 | 0 | 3,852 |
Analyze the following 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::OnSelectRange(const gfx::Point& base,
const gfx::Point& extent) {
Send(new InputHostMsg_SelectRange_ACK(GetRenderWidget()->routing_id()));
base::AutoReset<bool> handling_select_range(&handling_select_range_, true);
frame_->selectRange(base, extent);... | 0 | 123,172 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: R_API RBinJavaCPTypeObj *r_bin_java_clone_cp_item(RBinJavaCPTypeObj *obj) {
RBinJavaCPTypeObj *clone_obj = NULL;
if (obj == NULL) {
return clone_obj;
}
clone_obj = R_NEW0 (RBinJavaCPTypeObj);
if (clone_obj) {
memcpy (clone_obj, obj, sizeof (RBinJavaCPTypeObj));
clone_obj->metas = (RBinJavaMetaInfo *) R... | 0 | 79,699 |
Analyze the following 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 ocfs2_add_inode_data(struct ocfs2_super *osb,
struct inode *inode,
u32 *logical_offset,
u32 clusters_to_add,
int mark_unwritten,
struct buffer_head *fe_bh,
handle_t *handle,
struct ocfs2_alloc_context *data_ac,
struct ocfs2_alloc_context *meta_ac,
enum ocfs2_alloc_restarted... | 0 | 85,789 |
Analyze the following 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 usb_net_reset_in_buf(USBNetState *s)
{
s->in_ptr = s->in_len = 0;
qemu_flush_queued_packets(qemu_get_queue(s->nic));
}
Commit Message:
CWE ID: | 0 | 12,615 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebPage::setDocumentSelection(const Platform::IntPoint& documentStartPoint, const Platform::IntPoint& documentEndPoint)
{
if (d->m_page->defersLoading())
return;
d->m_selectionHandler->setSelection(documentStartPoint, documentEndPoint);
}
Commit Message: [BlackBerry] Adapt to new BlackBerry... | 0 | 104,398 |
Analyze the following 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 handle_ping_frame(h2o_http2_conn_t *conn, h2o_http2_frame_t *frame, const char **err_desc)
{
h2o_http2_ping_payload_t payload;
int ret;
if ((ret = h2o_http2_decode_ping_payload(&payload, frame, err_desc)) != 0)
return ret;
h2o_http2_encode_ping_frame(&conn->_write.buf, 1, payl... | 0 | 52,564 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void nl80211_send_scan_done(struct cfg80211_registered_device *rdev,
struct net_device *netdev)
{
struct sk_buff *msg;
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg)
return;
if (nl80211_send_scan_msg(msg, rdev, netdev, 0, 0, 0,
NL80211_CMD_NEW_SCAN_RESULTS) < 0) {
nlmsg_free(msg... | 0 | 26,750 |
Analyze the following 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 phar_open_executed_filename(char *alias, int alias_len, char **error TSRMLS_DC) /* {{{ */
{
char *fname;
zval *halt_constant;
php_stream *fp;
int fname_len;
char *actual = NULL;
int ret;
if (error) {
*error = NULL;
}
fname = (char*)zend_get_executed_filename(TSRMLS_C);
fname_len = strlen(fname);... | 0 | 4,468 |
Analyze the following 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 int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num)
{
BDRVParallelsState *s = bs->opaque;
uint32_t index, offset;
index = sector_num / s->tracks;
offset = sector_num % s->tracks;
/* not allocated */
if ((index > s->catalog_size) || (s->catalog_bitmap[index] == 0))
re... | 0 | 16,949 |
Analyze the following 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 trace_latency_header(struct seq_file *m)
{
struct trace_iterator *iter = m->private;
struct trace_array *tr = iter->tr;
/* print nothing if the buffers are empty */
if (trace_empty(iter))
return;
if (iter->iter_flags & TRACE_FILE_LAT_FMT)
print_trace_header(m, iter);
if (!(tr->trace_flags & TRAC... | 0 | 81,412 |
Analyze the following 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 BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary(
TabContentsWrapper* tab) {
static const char* kBadFlags[] = {
switches::kSingleProcess,
switches::kNoSandbox,
switches::kInProcessWebGL,
NULL
};
const char* bad_flag = NULL;
for (const char** flag = kBadFlags; *flag; ... | 0 | 109,351 |
Analyze the following 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_from_extension (SF_PRIVATE *psf)
{ char *cptr ;
char buffer [16] ;
int format = 0 ;
if ((cptr = strrchr (psf->file.name.c, '.')) == NULL)
return 0 ;
cptr ++ ;
if (strlen (cptr) > sizeof (buffer) - 1)
return 0 ;
psf_strlcpy (buffer, sizeof (buffer), cptr) ;
buffer [sizeof (buffer) - 1] = 0 ;
... | 0 | 95,353 |
Analyze the following 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::unregisterNodeList(LiveNodeListBase* list)
{
if (list->hasIdNameCache())
m_nodeListCounts[InvalidateOnIdNameAttrChange]--;
m_nodeListCounts[list->invalidationType()]--;
if (list->isRootedAtDocument()) {
ASSERT(m_listsInvalidatedAtDocument.contains(list));
m_lists... | 0 | 102,905 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nlmsvc_remove_block(struct nlm_block *block)
{
if (!list_empty(&block->b_list)) {
spin_lock(&nlm_blocked_lock);
list_del_init(&block->b_list);
spin_unlock(&nlm_blocked_lock);
nlmsvc_release_block(block);
}
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates ... | 0 | 65,230 |
Analyze the following 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 warning_callback(const char *msg, void *client_data)
{
FILE *stream = (FILE*)client_data;
fprintf(stream, "[WARNING] %s", msg);
}
Commit Message: opj_mj2_extract: Check provided output prefix for length
This uses snprintf() with correct buffer length instead of sprintf(). This
prevents a buffer ove... | 0 | 84,066 |
Analyze the following 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 WaitForExtensionsDevModeControlsVisibility(
content::WebContents* contents,
const char* dev_controls_accessor_js,
const char* dev_controls_visibility_check_js,
bool expected_visible) {
bool done = false;
ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
contents,
base::StringP... | 0 | 157,110 |
Analyze the following 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 ParamTraits<ListValue>::Log(const param_type& p, std::string* l) {
std::string json;
base::JSONWriter::Write(&p, &json);
l->append(json);
}
Commit Message: Validate that paths don't contain embedded NULLs at deserialization.
BUG=166867
Review URL: https://chromiumcodereview.appspot.com/11743009
git... | 0 | 117,374 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int ras_getdata(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap,
jas_image_t *image)
{
int ret;
switch (hdr->type) {
case RAS_TYPE_OLD:
case RAS_TYPE_STD:
ret = ras_getdatastd(in, hdr, cmap, image);
break;
case RAS_TYPE_RLE:
jas_eprintf("error: RLE encoding method not supported\n");
ret ... | 0 | 72,972 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int PrintRenderFrameHelper::PrintPreviewContext::total_page_count() const {
DCHECK(state_ != UNINITIALIZED);
return total_page_count_;
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any con... | 0 | 149,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 SoftAACEncoder::initPorts() {
OMX_PARAM_PORTDEFINITIONTYPE def;
InitOMXParams(&def);
def.nPortIndex = 0;
def.eDir = OMX_DirInput;
def.nBufferCountMin = kNumBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = kNumSamplesPerFrame * sizeof(int16_t) * 2;
def.bEn... | 0 | 162,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: static double filter_bessel(const double x)
{
if (x == 0.0f)
return (double)(M_PI/4.0f);
return (KernelBessel_Order1((double)M_PI*x)/(2.0f*x));
}
Commit Message: gdImageScaleTwoPass memory leak fix
Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and
confirmed by @vapier. This bug actually ... | 0 | 56,315 |
Analyze the following 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 xlenCommand(client *c) {
robj *o;
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL
|| checkType(c,o,OBJ_STREAM)) return;
stream *s = o->ptr;
addReplyLongLong(c,s->length);
}
Commit Message: Abort in XGROUP if the key is not a stream
CWE ID: CWE-704 | 0 | 81,817 |
Analyze the following 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 crypto_rfc4309_encrypt(struct aead_request *req)
{
if (req->assoclen != 16 && req->assoclen != 20)
return -EINVAL;
req = crypto_rfc4309_crypt(req);
return crypto_aead_encrypt(req);
}
Commit Message: crypto: ccm - move cbcmac input off the stack
Commit f15f05b0a5de ("crypto: ccm - switch to sep... | 0 | 66,668 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DevToolsDomainHandler::~DevToolsDomainHandler() {
}
Commit Message: DevTools: speculative fix for crash in NetworkHandler::Disable
This keeps BrowserContext* and StoragePartition* instead of
RenderProcessHost* in an attemp to resolve UAF of RenderProcessHost
upon closure of DevTools front-end.
Bug: 801117, 7... | 0 | 148,430 |
Analyze the following 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 bool cast5_fpu_begin(bool fpu_enabled, unsigned int nbytes)
{
return glue_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS,
NULL, fpu_enabled, nbytes);
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never r... | 0 | 46,892 |
Analyze the following 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 smp_update_key_mask(tSMP_CB* p_cb, uint8_t key_type, bool recv) {
SMP_TRACE_DEBUG(
"%s before update role=%d recv=%d local_i_key = %02x, local_r_key = %02x",
__func__, p_cb->role, recv, p_cb->local_i_key, p_cb->local_r_key);
if (((p_cb->le_secure_connections_mode_is_used) || (p_cb->smp_over... | 0 | 162,795 |
Analyze the following 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 DownloadItemImpl::Delete(DeleteReason reason) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
switch (reason) {
case DELETE_DUE_TO_USER_DISCARD:
UMA_HISTOGRAM_ENUMERATION(
"Download.UserDiscard", GetDangerType(),
content::DOWNLOAD_DANGER_TYPE_MAX);
break;
... | 0 | 106,072 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void)
{
return GetCurrentThreadId();
}
Commit Message:
CWE ID: CWE-330 | 0 | 12,053 |
Analyze the following 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 free_old_xmit_skbs(struct send_queue *sq)
{
struct sk_buff *skb;
unsigned int len;
struct virtnet_info *vi = sq->vq->vdev->priv;
struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) {
pr_debug("Sent skb %p\n", skb);
u64_stats_update_... | 0 | 42,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: GF_Box *lsr1_New()
{
ISOM_DECL_BOX_ALLOC(GF_LASeRSampleEntryBox, GF_ISOM_BOX_TYPE_LSR1);
gf_isom_sample_entry_init((GF_SampleEntryBox*)tmp);
return (GF_Box *)tmp;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,194 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_FUNCTION(openssl_pbkdf2)
{
long key_length = 0, iterations = 0;
char *password; int password_len;
char *salt; int salt_len;
char *method; int method_len = 0;
unsigned char *out_buffer;
const EVP_MD *digest;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssll|s",
&password, &password_len,
... | 0 | 4,665 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: find_or_add_file(struct nfs4_file *new, struct knfsd_fh *fh)
{
struct nfs4_file *fp;
unsigned int hashval = file_hashval(fh);
rcu_read_lock();
fp = find_file_locked(fh, hashval);
rcu_read_unlock();
if (fp)
return fp;
spin_lock(&state_lock);
fp = find_file_locked(fh, hashval);
if (likely(fp == NULL)) ... | 0 | 65,456 |
Analyze the following 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 CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock)
{
CURLcode result = CURLE_OK;
SSLChannelInfo channel;
SSLCipherSuiteInfo suite;
CERTCertificate *cert;
CERTCertificate *cert2;
CERTCertificate *cert3;
PRTime now;
int i;
if(SSL_GetChannelInfo(sock, &channel, sizeof ch... | 0 | 50,087 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: brcmf_notify_tdls_peer_event(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
switch (e->reason) {
case BRCMF_E_REASON_TDLS_PEER_DISCOVERED:
brcmf_dbg(TRACE, "TDLS Peer Discovered\n");
break;
case BRCMF_E_REASON_TDLS_PEER_CONNECTED:
brcmf_dbg(TRACE, "TDLS Peer Connected\n");
... | 0 | 49,100 |
Analyze the following 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 v9fs_fix_path(V9fsPath *dst, V9fsPath *src, int len)
{
V9fsPath str;
v9fs_path_init(&str);
v9fs_path_copy(&str, dst);
v9fs_path_sprintf(dst, "%s%s", src->data, str.data + len);
v9fs_path_free(&str);
}
Commit Message:
CWE ID: CWE-362 | 0 | 1,486 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) {
if (!delegate_)
return nullptr;
WebContents* new_contents = delegate_->OpenURLFromTab(this, params);
RenderFrameHost* source_render_frame_host = RenderFrameHost::FromID(
params.source_render_process_id, params.source_render_fra... | 0 | 147,707 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PaintChunk::Id DefaultId() {
DEFINE_STATIC_LOCAL(FakeDisplayItemClient, fake_client, ());
return PaintChunk::Id(fake_client, DisplayItem::kDrawingFirst);
}
Commit Message: Reland "[CI] Make paint property nodes non-ref-counted"
This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7.
Reason for revert... | 0 | 125,549 |
Analyze the following 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 jswrap_graphics_idle() {
graphicsIdle();
return false;
}
Commit Message: Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421)
CWE ID: CWE-125 | 0 | 82,576 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
unsigned long addr, unsigned len)
{
void *opfunc = get_call_destination(type);
unsigned ret;
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2... | 0 | 79,064 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::string16 BrowserView::GetAccessibleTabLabel(bool include_app_name,
int index) const {
if (index == -1)
return base::string16();
base::string16 window_title =
browser_->GetWindowTitleForTab(include_app_name, index);
return chrome::AssembleTab... | 0 | 155,167 |
Analyze the following 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 PHP_METHOD(PDOStatement, setAttribute)
{
long attr;
zval *value = NULL;
PHP_STMT_GET_OBJ;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz!", &attr, &value)) {
RETURN_FALSE;
}
if (!stmt->methods->set_attribute) {
goto fail;
}
PDO_STMT_CLEAR_ERR();
if (stmt->methods->set_a... | 0 | 72,397 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pdf14_buf_free(pdf14_buf *buf)
{
pdf14_parent_color_t *old_parent_color_info = buf->parent_color_info_procs;
gs_memory_t *memory = buf->memory;
if (buf->mask_stack && buf->mask_stack->rc_mask)
rc_decrement(buf->mask_stack->rc_mask, "pdf14_buf_free");
gs_free_object(memory, buf->mask_stac... | 0 | 2,933 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.