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: LoadWatcher(ScriptContext* context,
content::RenderFrame* frame,
v8::Local<v8::Function> cb)
: content::RenderFrameObserver(frame),
context_(context),
callback_(context->isolate(), cb) {
if (ExtensionFrameHelper::Get(frame)->
did_create_current_d... | 1 | 172,145 |
Analyze the following 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::vector<ExtensionSyncData> ExtensionService::GetSyncDataList(
ExtensionFilter filter) const {
std::vector<ExtensionSyncData> sync_data_list;
GetSyncDataListHelper(extensions_, filter, &sync_data_list);
GetSyncDataListHelper(disabled_extensions_, filter, &sync_data_list);
GetSyncDataListHelper(term... | 0 | 99,924 |
Analyze the following 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 set_dor(int fdc, char mask, char data)
{
unsigned char unit;
unsigned char drive;
unsigned char newdor;
unsigned char olddor;
if (FDCS->address == -1)
return -1;
olddor = FDCS->dor;
newdor = (olddor & mask) | data;
if (newdor != olddor) {
unit = olddor & 0x3;
if (is_selected(olddor, uni... | 0 | 39,432 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderFrameHost* RenderFrameHost::FromAXTreeID(
int ax_tree_id) {
return RenderFrameHostImpl::FromAXTreeID(ax_tree_id);
}
Commit Message: Correctly reset FP in RFHI whenever origin changes
Bug: 713364
Change-Id: Id8bb923750e20f3db6fc9358b1d44120513ac95f
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:... | 0 | 127,779 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static __init int rb_test(void *arg)
{
struct rb_test_data *data = arg;
while (!kthread_should_stop()) {
rb_write_something(data, false);
data->cnt++;
set_current_state(TASK_INTERRUPTIBLE);
/* Now sleep between a min of 100-300us and a max of 1ms */
usleep_range(((data->cnt % 3) + 1) * 100, 1000);
... | 0 | 72,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 inline unsigned int iucv_accept_poll(struct sock *parent)
{
struct iucv_sock *isk, *n;
struct sock *sk;
list_for_each_entry_safe(isk, n, &iucv_sk(parent)->accept_q, accept_q) {
sk = (struct sock *) isk;
if (sk->sk_state == IUCV_CONNECTED)
return POLLIN | POLLRDNORM;
}
return 0;
}
Commit Mes... | 0 | 30,594 |
Analyze the following 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 x86newTokenType getToken(const char *str, size_t *begin, size_t *end) {
while (begin && isspace ((ut8)str[*begin])) {
++(*begin);
}
if (!str[*begin]) { // null byte
*end = *begin;
return TT_EOF;
} else if (isalpha ((ut8)str[*begin])) { // word token
*end = *begin;
wh... | 1 | 168,970 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static u32 filter_connect(struct tipc_sock *tsock, struct sk_buff **buf)
{
struct socket *sock = tsock->sk.sk_socket;
struct tipc_msg *msg = buf_msg(*buf);
struct sock *sk = &tsock->sk;
u32 retval = TIPC_ERR_NO_PORT;
int res;
if (msg_mcast(msg))
return retval;
switch ((int)sock->state) {
case SS_CONNE... | 0 | 30,453 |
Analyze the following 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 BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) {
bool custom_frame_default = false;
if (ui::XDisplayExists() &&
!prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) {
custom_frame_default = GetCustomFramePrefDefault();
}
prefs->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
... | 0 | 117,998 |
Analyze the following 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::DoUniformMatrix3x2fv(GLint fake_location,
GLsizei count,
GLboolean transpose,
const volatile GLfloat* value) {
GLenum type = 0;
GLint real_location = -1;
... | 0 | 141,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: char *lxc_append_paths(const char *first, const char *second)
{
size_t len = strlen(first) + strlen(second) + 1;
const char *pattern = "%s%s";
char *result = NULL;
if (second[0] != '/') {
len += 1;
pattern = "%s/%s";
}
result = calloc(1, len);
if (!result)
return NULL;
snprintf(result, len, patte... | 0 | 44,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: void PrintPreviewHandler::HandleSignin(const ListValue* /*args*/) {
gfx::NativeWindow modal_parent =
platform_util::GetTopLevel(preview_web_contents()->GetNativeView());
print_dialog_cloud::CreateCloudPrintSigninDialog(
preview_web_contents()->GetBrowserContext(),
modal_parent,
base::B... | 0 | 105,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: void RenderBlock::layoutRunsAndFloats(LineLayoutState& layoutState, bool hasInlineChild)
{
InlineBidiResolver resolver;
RootInlineBox* startLine = determineStartPosition(layoutState, resolver);
unsigned consecutiveHyphenatedLines = 0;
if (startLine) {
for (RootInlineBox* line = startLine-... | 0 | 111,372 |
Analyze the following 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_sched_scan_results(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_net_info_le *netinfo, *netinfo_start;
struct cfg80211_scan_request *request = NULL;
struct cfg80211_ssid *ssid = NULL;
struct ieee8021... | 0 | 49,099 |
Analyze the following 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 GCC_FMT_ATTR(3, 4) report_unsupported(BlockDriverState *bs,
Error **errp, const char *fmt, ...)
{
char msg[64];
va_list ap;
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
error_set(errp, QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, bs->device_name, "qcow2",
... | 0 | 16,832 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xfs_attr_node_removename(xfs_da_args_t *args)
{
xfs_da_state_t *state;
xfs_da_state_blk_t *blk;
xfs_inode_t *dp;
struct xfs_buf *bp;
int retval, error, forkoff;
trace_xfs_attr_node_removename(args);
/*
* Tie a string around our finger to remind us where we are.
*/
dp = args->dp;
state = xfs_da_stat... | 0 | 76,323 |
Analyze the following 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 kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
int r;
sigset_t sigsaved;
if (vcpu->mmio_needed) {
vcpu->mmio_needed = 0;
if (!vcpu->mmio_is_write)
kvmppc_complete_mmio_load(vcpu, run);
#ifdef CONFIG_VSX
if (vcpu->arch.mmio_vsx_copy_nums > 0) {
vcpu->arch.mmio_vsx_copy_nu... | 0 | 60,521 |
Analyze the following 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 php_snmp_error(zval *object, const char *docref, int type, const char *format, ...)
{
va_list args;
php_snmp_object *snmp_object = NULL;
if (object) {
snmp_object = Z_SNMP_P(object);
if (type == PHP_SNMP_ERRNO_NOERROR) {
memset(snmp_object->snmp_errstr, 0, sizeof(snmp_object->snmp_errstr));... | 1 | 165,074 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t MediaRecorder::setVideoSource(int vs)
{
ALOGV("setVideoSource(%d)", vs);
if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsVideoSourceSet) {
ALOGE("video source has already been set");
return INVALID_OPERATION;
}
if... | 0 | 159,548 |
Analyze the following 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 OutOfProcessInstance::DocumentHasUnsupportedFeature(
const std::string& feature) {
std::string metric("PDF_Unsupported_");
metric += feature;
if (!unsupported_features_reported_.count(metric)) {
unsupported_features_reported_.insert(metric);
UserMetricsRecordAction(metric);
}
if (!full... | 0 | 129,417 |
Analyze the following 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_string_internal(uschar *string, BOOL ket_ends, uschar **left,
BOOL skipping, BOOL honour_dollar, BOOL *resetok_p)
{
int ptr = 0;
int size = Ustrlen(string)+ 64;
int item_type;
uschar *yield = store_get(size);
uschar *s = string;
uschar *save_expand_nstring[EXPAND_MAXN+1];
int save_expand_nlength[EXPAND_M... | 1 | 165,192 |
Analyze the following 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 v9fs_xattr_set_acl(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
{
int retval;
struct posix_acl *acl;
struct v9fs_session_info *v9ses;
v9ses = v9fs_dentry2v9ses(dentry);
/*
... | 1 | 166,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: void LockContentsView::SetAvatarForUser(const AccountId& account_id,
const mojom::UserAvatarPtr& avatar) {
auto replace = [&](const mojom::LoginUserInfoPtr& user) {
auto changed = user->Clone();
changed->basic_user_info->avatar = avatar->Clone();
return change... | 0 | 131,538 |
Analyze the following 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::Point Textfield::GetLastClickLocation() const {
return selection_controller_.last_click_location();
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
... | 0 | 126,332 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int64_t RenderWidgetHostImpl::GetLatencyComponentId() const {
return latency_tracker_.latency_component_id();
}
Commit Message: Check that RWHI isn't deleted manually while owned by a scoped_ptr in RVHI
BUG=590284
Review URL: https://codereview.chromium.org/1747183002
Cr-Commit-Position: refs/heads/master@{... | 0 | 130,956 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int buffer_get(void *data)
{
char c;
buffer_data_t *stream = data;
if(stream->pos >= stream->len)
return EOF;
c = stream->data[stream->pos];
stream->pos++;
return (unsigned char)c;
}
Commit Message: Fix for issue #282
The fix limits recursion depths when parsing arrays and ... | 0 | 53,334 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cf2_hint_initZero( CF2_Hint hint )
{
FT_ZERO( hint );
}
Commit Message:
CWE ID: CWE-119 | 0 | 7,145 |
Analyze the following 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 xmlCleanupGlobals(void)
{
if (xmlThrDefMutex != NULL) {
xmlFreeMutex(xmlThrDefMutex);
xmlThrDefMutex = NULL;
}
__xmlGlobalInitMutexDestroy();
}
Commit Message: Attempt to address libxml crash.
BUG=129930
Review URL: https://chromiumcodereview.appspot.com/10458051
git-svn-id: svn://svn.chromi... | 0 | 107,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: status_t FLACSource::read(
MediaBuffer **outBuffer, const ReadOptions *options)
{
MediaBuffer *buffer;
int64_t seekTimeUs;
ReadOptions::SeekMode mode;
if ((NULL != options) && options->getSeekTo(&seekTimeUs, &mode)) {
FLAC__uint64 sample;
if (seekTimeUs <= 0LL) {
sample = 0LL;
} else {
... | 0 | 162,523 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RendererSchedulerImpl::GetSchedulerHelperForTesting() {
return &helper_;
}
Commit Message: [scheduler] Remove implicit fallthrough in switch
Bail out early when a condition in the switch is fulfilled.
This does not change behaviour due to RemoveTaskObserver being no-op when
the task observer is not present in... | 0 | 143,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: iasecc_sdo_key_rsa_put_data(struct sc_card *card, struct iasecc_sdo_rsa_update *update)
{
struct sc_context *ctx = card->ctx;
unsigned char scb;
int rv;
LOG_FUNC_CALLED(ctx);
if (update->sdo_prv_key) {
sc_log(ctx, "encode private rsa in %p", &update->update_prv);
rv = iasecc_sdo_encode_rsa_update(car... | 0 | 78,515 |
Analyze the following 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 TabsDetectLanguageFunction::RunAsync() {
std::unique_ptr<tabs::DetectLanguage::Params> params(
tabs::DetectLanguage::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
int tab_id = 0;
Browser* browser = NULL;
WebContents* contents = NULL;
if (params->tab_id.get()) {
t... | 0 | 155,674 |
Analyze the following 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 MostVisitedSitesBridge::JavaObserver::OnIconMadeAvailable(
const GURL& site_url) {
JNIEnv* env = AttachCurrentThread();
Java_MostVisitedURLsObserver_onIconMadeAvailable(
env, observer_, ConvertUTF8ToJavaString(env, site_url.spec()));
}
Commit Message: Rename MostVisitedSites.MostVisitedUR... | 1 | 172,034 |
Analyze the following 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 uint16_t data_stream_element(NeAACDecStruct *hDecoder, bitfile *ld)
{
uint8_t byte_aligned;
uint16_t i, count;
/* element_instance_tag = */ faad_getbits(ld, LEN_TAG
DEBUGVAR(1,60,"data_stream_element(): element_instance_tag"));
byte_aligned = faad_get1bit(ld
DEBUGVAR(1,61,"... | 0 | 88,373 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: setup_efi_state(struct boot_params *params, unsigned long params_load_addr,
unsigned int efi_map_offset, unsigned int efi_map_sz,
unsigned int efi_setup_data_offset)
{
struct efi_info *current_ei = &boot_params.efi_info;
struct efi_info *ei = ¶ms->efi_info;
if (!current_ei->efi_memmap_size)
return 0... | 1 | 168,868 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8WindowShell::updateDocument()
{
ASSERT(m_world->isMainWorld());
if (m_global.isEmpty())
return;
if (m_context.isEmpty())
return;
updateDocumentProperty();
updateSecurityOrigin();
}
Commit Message: Fix tracking of the id attribute string if it is shared across elements.
... | 0 | 110,441 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dpbOutPicture_t* h264bsdDpbOutputPicture(dpbStorage_t *dpb)
{
/* Variables */
/* Code */
ASSERT(dpb);
if (dpb->outIndex < dpb->numOut)
return(dpb->outBuf + dpb->outIndex++);
else
return(NULL);
}
Commit Message: Fix potential overflow
Bug: 28533562
Change-Id: I798ab24caa4c81f3ba564cad7c9ee019284fb70... | 0 | 159,582 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PanoramiXRenderTriFan(ClientPtr client)
{
PanoramiXRes *src, *dst;
int result = Success, j;
REQUEST(xRenderTriFanReq);
char *extra;
int extra_len;
REQUEST_AT_LEAST_SIZE (xRenderTriFanReq);
VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
... | 0 | 14,048 |
Analyze the following 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 RenderThreadImpl::EnableStreamTextureCopy() {
return sync_compositor_message_filter_.get();
}
Commit Message: Roll src/third_party/boringssl/src 664e99a64..696c13bd6
https://boringssl.googlesource.com/boringssl/+log/664e99a6486c293728097c661332f92bf2d847c6..696c13bd6ab78011adfe7b775519c8b7cc82b604
BUG=7... | 0 | 150,506 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: e1000e_intrmgr_on_throttling_timer(void *opaque)
{
E1000IntrDelayTimer *timer = opaque;
assert(!msix_enabled(timer->core->owner));
timer->running = false;
if (!timer->core->itr_intr_pending) {
trace_e1000e_irq_throttling_no_pending_interrupts();
return;
}
if (msi_enable... | 0 | 5,987 |
Analyze the following 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 WebContentsAndroid::HideTransitionElements(JNIEnv* env,
jobject jobj,
jstring css_selector) {
web_contents_->GetMainFrame()->Send(
new FrameMsg_HideTransitionElements(
web_contents_->GetMainFrame... | 0 | 109,885 |
Analyze the following 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 omx_venc::dev_is_video_session_supported(OMX_U32 width, OMX_U32 height)
{
#ifdef _MSM8974_
return handle->venc_is_video_session_supported(width,height);
#else
DEBUG_PRINT_LOW("Check against video capability not supported");
return true;
#endif
}
Commit Message: DO NOT MERGE mm-video-v4l2: venc: add ch... | 0 | 159,225 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebContentsImpl::SendUserGestureForResourceDispatchHost() {
ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get();
if (rdh)
rdh->OnUserGesture();
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not... | 0 | 145,039 |
Analyze the following 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 AudioMixerAlsa::ApplyState() {
DCHECK(MessageLoop::current() == thread_->message_loop());
if (!alsa_mixer_)
return;
bool should_mute = false;
double new_volume_db = 0;
{
base::AutoLock lock(lock_);
should_mute = is_muted_;
new_volume_db = should_mute ? min_volume_db_ : volume_db_;
... | 0 | 109,256 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void efx_start_channel(struct efx_channel *channel)
{
struct efx_rx_queue *rx_queue;
netif_dbg(channel->efx, ifup, channel->efx->net_dev,
"starting chan %d\n", channel->channel);
/* The interrupt handler for this channel may set work_pending
* as soon as we enable it. Make sure it's cleared bef... | 0 | 19,435 |
Analyze the following 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 nfs4_proc_lookup(struct inode *dir, struct qstr *name,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
int status;
struct rpc_clnt *client = NFS_CLIENT(dir);
status = nfs4_proc_lookup_common(&client, dir, name, fhandle, fattr);
if (client != NFS_CLIENT(dir)) {
rpc_shutdown_client(clien... | 0 | 29,200 |
Analyze the following 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 md_update_sb(struct mddev *mddev, int force_change)
{
struct md_rdev *rdev;
int sync_req;
int nospares = 0;
int any_badblocks_changed = 0;
if (mddev->ro) {
if (force_change)
set_bit(MD_CHANGE_DEVS, &mddev->flags);
return;
}
repeat:
/* First make sure individual recovery_offsets are correct */
... | 0 | 42,480 |
Analyze the following 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 SeekHead::GetVoidElementCount() const { return m_void_element_count; }
Commit Message: external/libvpx/libwebm: Update snapshot
Update libwebm snapshot. This update contains security fixes from upstream.
Upstream git hash: 229f49347d19b0ca0941e072b199a242ef6c5f2b
BUG=23167726
Change-Id: Id3e140e7b31ae112... | 0 | 160,821 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: CACHE_LIMITER_FUNC(private) /* {{{ */
{
ADD_HEADER("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
CACHE_LIMITER(private_no_expire)(TSRMLS_C);
}
/* }}} */
Commit Message:
CWE ID: CWE-416 | 0 | 9,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: IW_IMPL(int) iw_is_valid_density(double density_x, double density_y, int density_code)
{
if(density_x<0.0001 || density_y<0.0001) return 0;
if(density_x>10000000.0 || density_y>10000000.0) return 0;
if(density_x/10.0>density_y) return 0;
if(density_y/10.0>density_x) return 0;
if(density_code!=IW_DENSITY_UNIT... | 0 | 64,974 |
Analyze the following 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 dw2102_serit_i2c_transfer(struct i2c_adapter *adap,
struct i2c_msg msg[], int num)
{
struct dvb_usb_device *d = i2c_get_adapdata(adap);
u8 buf6[] = {0, 0, 0, 0, 0, 0, 0};
if (!d)
return -ENODEV;
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;
switch (num) {
case 2:
... | 0 | 66,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: ofputil_decode_table_miss(ovs_be32 config_, enum ofp_version version)
{
uint32_t config = ntohl(config_);
if (version == OFP11_VERSION || version == OFP12_VERSION) {
switch (config & OFPTC11_TABLE_MISS_MASK) {
case OFPTC11_TABLE_MISS_CONTROLLER:
return OFPUTIL_TABLE_MISS_CONTR... | 0 | 77,546 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ftp_mdtm(ftpbuf_t *ftp, const char *path)
{
time_t stamp;
struct tm *gmt, tmbuf;
struct tm tm;
char *ptr;
int n;
if (ftp == NULL) {
return -1;
}
if (!ftp_putcmd(ftp, "MDTM", path)) {
return -1;
}
if (!ftp_getresp(ftp) || ftp->resp != 213) {
return -1;
}
/* parse out the timestamp */
for (pt... | 0 | 14,796 |
Analyze the following 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 __release_reference_state(struct bpf_func_state *state, int ptr_id)
{
int i, last_idx;
if (!ptr_id)
return -EFAULT;
last_idx = state->acquired_refs - 1;
for (i = 0; i < state->acquired_refs; i++) {
if (state->refs[i].id == ptr_id) {
if (last_idx && i != last_idx)
memcpy(&state->refs[i]... | 0 | 91,392 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dtdCreate(const XML_Memory_Handling_Suite *ms)
{
DTD *p = (DTD *)ms->malloc_fcn(sizeof(DTD));
if (p == NULL)
return p;
poolInit(&(p->pool), ms);
poolInit(&(p->entityValuePool), ms);
hashTableInit(&(p->generalEntities), ms);
hashTableInit(&(p->elementTypes), ms);
hashTableInit(&(p->attributeIds),... | 0 | 92,314 |
Analyze the following 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 MetricsWebContentsObserver::HandleFailedNavigationForTrackedLoad(
content::NavigationHandle* navigation_handle,
std::unique_ptr<PageLoadTracker> tracker) {
const base::TimeTicks now = base::TimeTicks::Now();
tracker->FailedProvisionalLoad(navigation_handle, now);
const net::Error error = navig... | 0 | 140,139 |
Analyze the following 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::DidUpdateCharacterData(CharacterData* node,
unsigned offset,
unsigned old_length,
unsigned new_length) {
if (selection_.IsNone() || !node || !node->isConne... | 0 | 124,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: void Document::didRemoveAllPendingStylesheet()
{
m_needsNotifyRemoveAllPendingStylesheet = false;
styleResolverChanged(RecalcStyleDeferred, AnalyzedStyleUpdate);
executeScriptsWaitingForResourcesIfNeeded();
if (m_gotoAnchorNeededAfterStylesheetsLoad && view())
view()->scrollToFragment(m_... | 0 | 102,692 |
Analyze the following 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 u64 numa_get_avg_runtime(struct task_struct *p, u64 *period)
{
u64 runtime, delta, now;
/* Use the start of this time slice to avoid calculations. */
now = p->se.exec_start;
runtime = p->se.sum_exec_runtime;
if (p->last_task_numa_placement) {
delta = runtime - p->last_sum_exec_runtime;
*period = ... | 0 | 92,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: static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodAttrArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
Commit Message: document.location bind... | 0 | 122,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: update_fragments(vpx_codec_alg_priv_t *ctx,
const uint8_t *data,
unsigned int data_sz,
vpx_codec_err_t *res)
{
*res = VPX_CODEC_OK;
if (ctx->fragments.count == 0)
{
/* New frame, reset fragment pointers and sizes */
memset((void*)ctx->fragments.ptrs, 0, sizeof(ctx->fragments.ptrs));
... | 0 | 157,768 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int efx_init_io(struct efx_nic *efx)
{
struct pci_dev *pci_dev = efx->pci_dev;
dma_addr_t dma_mask = efx->type->max_dma_mask;
int rc;
netif_dbg(efx, probe, efx->net_dev, "initialising I/O\n");
rc = pci_enable_device(pci_dev);
if (rc) {
netif_err(efx, probe, efx->net_dev,
"failed to enable PC... | 0 | 19,378 |
Analyze the following 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 BoundNetLog& HttpProxyClientSocket::NetLog() const {
return net_log_;
}
Commit Message: Sanitize headers in Proxy Authentication Required responses
BUG=431504
Review URL: https://codereview.chromium.org/769043003
Cr-Commit-Position: refs/heads/master@{#310014}
CWE ID: CWE-19 | 0 | 129,335 |
Analyze the following 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(pg_update)
{
zval *pgsql_link, *values, *ids;
char *table;
size_t table_len;
zend_ulong option = PGSQL_DML_EXEC;
PGconn *pg_link;
zend_string *sql = NULL;
int id = -1, argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rsaa|l",
&pgsql_link, &table, &table_len, &values, &ids, ... | 0 | 5,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 DocumentThreadableLoader::loadFallbackRequestForServiceWorker()
{
clearResource();
ResourceRequest fallbackRequest(m_fallbackRequestForServiceWorker);
m_fallbackRequestForServiceWorker = ResourceRequest();
dispatchInitialRequest(fallbackRequest);
}
Commit Message: DocumentThreadableLoader: A... | 0 | 119,493 |
Analyze the following 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 jas_image_cmpt_t *jas_image_cmpt_create(int_fast32_t tlx,
int_fast32_t tly, int_fast32_t hstep, int_fast32_t vstep,
int_fast32_t width, int_fast32_t height, uint_fast16_t depth, bool sgnd,
uint_fast32_t inmem)
{
jas_image_cmpt_t *cmpt;
size_t size;
cmpt = 0;
if (width < 0 || height < 0 || h... | 1 | 168,693 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Layer::RemoveAnimation(int animation_id) {
layer_animation_controller_->RemoveAnimation(animation_id);
SetNeedsCommit();
}
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 synchr... | 0 | 111,876 |
Analyze the following 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 EAS_RESULT PushcdlStack (EAS_U32 *pStack, EAS_INT *pStackPtr, EAS_U32 value)
{
/* stack overflow, return an error */
if (*pStackPtr >= CDL_STACK_SIZE)
return EAS_ERROR_FILE_FORMAT;
/* push the value onto the stack */
*pStackPtr = *pStackPtr + 1;
pStack[*pStackPtr] = value;
return EAS_SUCCESS;
}... | 0 | 157,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: void DocumentLoader::UpdateForSameDocumentNavigation(
const KURL& new_url,
SameDocumentNavigationSource same_document_navigation_source,
scoped_refptr<SerializedScriptValue> data,
HistoryScrollRestorationType scroll_restoration_type,
FrameLoadType type,
Document* initiating_document) {
i... | 0 | 125,771 |
Analyze the following 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 AddClearBrowsingDataStrings(content::WebUIDataSource* html_source,
Profile* profile) {
int clear_cookies_summary_msg_id =
IDS_SETTINGS_CLEAR_COOKIES_AND_SITE_DATA_SUMMARY_BASIC;
#if defined(OS_CHROMEOS)
if (AccountConsistencyModeManager::IsMirrorEnabledForProfile(p... | 0 | 148,757 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: LayoutUnit RenderBlockFlow::adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const
{
LayoutUnit left = offsetFromFloats;
if (applyTextIndent && style()->isLeftToRightDirection())
left += textIndentOffset();
return left;
}
Commit Message: Separate repaint and... | 0 | 116,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 int jas_icclut8_output(jas_iccattrval_t *attrval, jas_stream_t *out)
{
jas_icclut8_t *lut8 = &attrval->data.lut8;
int i;
int j;
int n;
lut8->clut = 0;
lut8->intabs = 0;
lut8->intabsbuf = 0;
lut8->outtabs = 0;
lut8->outtabsbuf = 0;
if (jas_stream_putc(out, lut8->numinchans) == EOF ||
jas_stream... | 0 | 72,710 |
Analyze the following 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 addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
int i;
pInfo->aFunc = sqlite3ArrayAllocate(
db,
pInfo->aFunc,
sizeof(pInfo->aFunc[0]),
&pInfo->nFunc,
&i
);
return i;
}
Commit Message: sqlite: backport bugfixes for dbfuzz2
Bug: 952406
Change-Id: Icbec429742048d6... | 0 | 151,625 |
Analyze the following 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 remove_controlq_data(struct ports_device *portdev)
{
struct port_buffer *buf;
unsigned int len;
if (!use_multiport(portdev))
return;
while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
free_buf(buf, true);
while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
free_buf(buf, true... | 0 | 66,613 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const LayerTreeDebugState& LayerTreeHost::GetDebugState() const {
return debug_state_;
}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fails on MSAN
bots... | 0 | 137,111 |
Analyze the following 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 php_zip_parse_options(zval *options, long *remove_all_path,
char **remove_path, int *remove_path_len, char **add_path, int *add_path_len TSRMLS_DC) /* {{{ */
{
zval **option;
if (zend_hash_find(HASH_OF(options), "remove_all_path", sizeof("remove_all_path"), (void **)&option) == SUCCESS) {
long opt... | 0 | 51,302 |
Analyze the following 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 noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)
{
struct btrfs_fs_info *fs_info = btrfs_sb(fdentry(file)->d_sb);
struct btrfs_device *device;
struct request_queue *q;
struct fstrim_range range;
u64 minlen = ULLONG_MAX;
u64 num_devices = 0;
u64 total_bytes = btrfs_super_total_byt... | 0 | 34,410 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
char *fp, int count)
{
char flag = TTY_NORMAL;
while (count--) {
if (fp)
flag = *fp++;
if (likely(flag == TTY_NORMAL))
n_tty_receive_char_closing(tty, *cp++);
else
n_tty_receive_char_flagged(tty, *cp++, flag);
}
}
... | 0 | 39,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: u32 NextPacket(u8 **pStrm)
{
u32 index;
u32 maxIndex;
u32 zeroCount;
u8 *stream;
u8 byte;
static u32 prevIndex=0;
/* For default stream mode all the stream is in first packet */
if (!packetize && !nalUnitStream)
return 0;
index = 0;
stream = *pStrm + prevIndex;
maxIndex = (u... | 0 | 160,873 |
Analyze the following 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 drm_mode_group_init_legacy_group(struct drm_device *dev,
struct drm_mode_group *group)
{
struct drm_crtc *crtc;
struct drm_encoder *encoder;
struct drm_connector *connector;
int ret;
if ((ret = drm_mode_group_init(dev, group)))
return ret;
list_for_each_entry(crtc, &dev->mode_config.crtc_li... | 0 | 21,910 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static char *swiftField(const char *dn, const char *cn) {
char *p = strstr (dn, ".getter_");
if (!p) {
p = strstr (dn, ".setter_");
if (!p) {
p = strstr (dn, ".method_");
}
}
if (p) {
char *q = strstr (dn, cn);
if (q && q[strlen (cn)] == '.') {
q = strdup (q + strlen (cn) + 1);
char *r = st... | 0 | 82,822 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: has_invalid_xml_char (char *str)
{
gunichar c;
while (*str != 0)
{
c = g_utf8_get_char (str);
/* characters XML permits */
if (!(c == 0x9 ||
c == 0xA ||
c == 0xD ||
(c >= 0x20 && c <= 0xD7FF) ||
(c >= 0xE000 && c <= 0xFFF... | 0 | 61,079 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: choose_comp(struct sshcomp *comp, char *client, char *server)
{
char *name = match_list(client, server, NULL);
if (name == NULL)
return SSH_ERR_NO_COMPRESS_ALG_MATCH;
if (strcmp(name, "zlib@openssh.com") == 0) {
comp->type = COMP_DELAYED;
} else if (strcmp(name, "zlib") == 0) {
comp->type = COMP_ZLIB;
... | 0 | 17,941 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pkinit_server_plugin_init_realm(krb5_context context, const char *realmname,
pkinit_kdc_context *pplgctx)
{
krb5_error_code retval = ENOMEM;
pkinit_kdc_context plgctx = NULL;
*pplgctx = NULL;
plgctx = calloc(1, sizeof(*plgctx));
if (plgctx == NULL)
got... | 0 | 34,596 |
Analyze the following 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 WebPagePrivate::notifyPopupAutofillDialog(const Vector<String>& candidates)
{
vector<BlackBerry::Platform::String> textItems;
for (size_t i = 0; i < candidates.size(); i++)
textItems.push_back(candidates[i]);
m_client->notifyPopupAutofillDialog(textItems);
}
Commit Message: [BlackBerry] ... | 0 | 104,306 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderProcessHostWatcher::RenderProcessHostWatcher(
RenderProcessHost* render_process_host, WatchType type)
: render_process_host_(render_process_host),
type_(type),
did_exit_normally_(true),
message_loop_runner_(new MessageLoopRunner) {
render_process_host_->AddObserver(this);
}
Comm... | 0 | 156,133 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void AppendMostVisitedURLWithRedirect(const GURL& redirect_source,
const GURL& redirect_dest,
std::vector<MostVisitedURL>* list) {
MostVisitedURL mv;
mv.url = redirect_dest;
mv.redirects.push_back(redirect_source);
mv.redirects.pu... | 0 | 147,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 Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char zxscr[6144];
char zxattr[768];
int octetnr;
int octetline;
int zoneline;
int zonenr;
int octet_val;
int attr_nr;
int pix;
int piy;
int binar[8];
int attrbin[8];
int *pbin;
... | 1 | 168,601 |
Analyze the following 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 cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
{
dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe,
&adap->dev->i2c_adap, 0x61,
TUNER_PHILIPS_FMD1216ME_MK3);
return 0;
}
Commit Message: [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cx... | 0 | 66,731 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: CloudPolicySubsystem::ObserverRegistrar::~ObserverRegistrar() {
if (policy_notifier_)
policy_notifier_->RemoveObserver(observer_);
}
Commit Message: Reset the device policy machinery upon retrying enrollment.
BUG=chromium-os:18208
TEST=See bug description
Review URL: http://codereview.chromium.org/76760... | 0 | 97,783 |
Analyze the following 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 HTMLMediaElement::playbackRate() const {
return m_playbackRate;
}
Commit Message: [Blink>Media] Allow autoplay muted on Android by default
There was a mistake causing autoplay muted is shipped on Android
but it will be disabled if the chromium embedder doesn't specify
content setting for "AllowAutoplay... | 0 | 128,863 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PendingConfigureDataTypesState() : deleted_type(false),
reason(sync_api::CONFIGURE_REASON_UNKNOWN) {}
Commit Message: Enable HistoryModelWorker by default, now that bug 69561 is fixed.
BUG=69561
TEST=Run sync manually and run integration tests, sync should not crash.
Review URL: http://codereview.chromium.... | 0 | 101,470 |
Analyze the following 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 check_helper_call(struct bpf_verifier_env *env, int func_id, int insn_idx)
{
const struct bpf_func_proto *fn = NULL;
struct bpf_reg_state *regs;
struct bpf_call_arg_meta meta;
bool changes_data;
int i, err;
/* find function prototype */
if (func_id < 0 || func_id >= __BPF_FUNC_MAX_ID) {
verbo... | 0 | 76,373 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t SoftMPEG2::resetDecoder() {
ivd_ctl_reset_ip_t s_ctl_ip;
ivd_ctl_reset_op_t s_ctl_op;
IV_API_CALL_STATUS_T status;
s_ctl_ip.e_cmd = IVD_CMD_VIDEO_CTL;
s_ctl_ip.e_sub_cmd = IVD_CMD_CTL_RESET;
s_ctl_ip.u4_size = sizeof(ivd_ctl_reset_ip_t);
s_ctl_op.u4_size = sizeof(ivd_ctl_reset_op_t... | 0 | 163,909 |
Analyze the following 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 SVGElement::InstanceUpdatesBlocked() const {
return HasSVGRareData() && SvgRareData()->InstanceUpdatesBlocked();
}
Commit Message: Fix SVG crash for v0 distribution into foreignObject.
We require a parent element to be an SVG element for non-svg-root
elements in order to create a LayoutObject for them. H... | 0 | 152,768 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Xcalloc(unsigned long amount)
{
return calloc(1, amount);
}
Commit Message:
CWE ID: CWE-362 | 0 | 13,373 |
Analyze the following 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 DetectRunPostRules(
ThreadVars *tv,
DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx,
Packet * const p,
Flow * const pflow,
DetectRunScratchpad *scratch)
{
/* see if we need to increment the inspect_id and reset the de_state */
if (pflow && pflow->alstate ... | 0 | 84,294 |
Analyze the following 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(snmpwalk)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, (SNMP_CMD_WALK | SNMP_NUMERIC_KEYS), SNMP_VERSION_1);
}
Commit Message:
CWE ID: CWE-416 | 0 | 9,516 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
{
int error;
error = wait_event_freezekillable(server->response_q,
midQ->mid_state != MID_REQUEST_SUBMITTED);
if (error < 0)
return -ERESTARTSYS;
return 0;
}
Commit Message: cifs: move check for NULL socket into smb_send_... | 0 | 30,098 |
Analyze the following 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 f2fs_enable_quota_files(struct f2fs_sb_info *sbi)
{
int i, ret;
for (i = 0; i < MAXQUOTAS; i++) {
if (sbi->s_qf_names[i]) {
ret = f2fs_quota_on_mount(sbi, i);
if (ret < 0)
f2fs_msg(sbi->sb, KERN_ERR,
"Cannot turn on journaled "
"quota: error %d", ret);
}
}
}
Commit Message: f2fs:... | 0 | 86,041 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.