instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const unsigned char* TestingPlatformSupport::getTraceCategoryEnabledFlag(const char* categoryName)
{
static const unsigned char tracingIsDisabled = 0;
return &tracingIsDisabled;
}
Commit Message: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being used.
These... | 0 | 7,404 |
Analyze the following 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 SetPixelCacheExtent(Image *image,MagickSizeType length)
{
CacheInfo
*magick_restrict cache_info;
MagickOffsetType
count,
extent,
offset;
cache_info=(CacheInfo *) image->cache;
if (image->debug != MagickFalse)
{
char
format[MagickPathExtent],
... | 0 | 13,312 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8TestObject::ByteAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_byteAttribute_Getter");
test_object_v8_internal::ByteAttributeAttributeGetter(info);
}
Commit Message: bindings: Suppor... | 0 | 18,213 |
Analyze the following 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 bzrtp_packetBuild(bzrtpContext_t *zrtpContext, bzrtpChannelContext_t *zrtpChannelContext, bzrtpPacket_t *zrtpPacket, uint16_t sequenceNumber) {
int i;
uint8_t *messageTypeString;
uint8_t *messageString = NULL; /* will point directly to the begining of the message within the packetString buffer */
uint8_... | 0 | 17,465 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: XMPChunk::XMPChunk( ContainerChunk* parent ) : Chunk( parent, chunk_XMP , kChunk_XMP )
{
}
Commit Message:
CWE ID: CWE-190 | 0 | 5,210 |
Analyze the following 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 path_is_mount_point(const char *t, bool allow_symlink) {
struct stat a, b;
char *parent;
int r;
if (allow_symlink)
r = stat(t, &a);
else
r = lstat(t, &a);
if (r < 0) {
if (errno == ENOENT)
... | 0 | 13,792 |
Analyze the following 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 MediaPlayer::setPlaybackSettings(const AudioPlaybackRate& rate)
{
ALOGV("setPlaybackSettings: %f %f %d %d",
rate.mSpeed, rate.mPitch, rate.mFallbackMode, rate.mStretchMode);
if (rate.mSpeed < 0.f || rate.mPitch < 0.f) {
return BAD_VALUE;
}
Mutex::Autolock _l(mLock);
if (mPlayer == 0)... | 0 | 6,347 |
Analyze the following 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 netdev_tx_t airo_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
s16 len;
int i, j;
struct airo_info *priv = dev->ml_priv;
u32 *fids = priv->fids;
if ( skb == NULL ) {
airo_print_err(dev->name, "%s: skb == NULL!", __func__);
return NETDEV_TX_OK;
}
/* Find a vacant FID */
for( ... | 0 | 8,871 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: JSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
ExceptionCode ec = 0;
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
JSC::JSValue result = toJS(exec, castedThis->glob... | 0 | 9,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: blink::WebView* FrameReference::view() {
return view_;
}
Commit Message: Crash on nested IPC handlers in PrintWebViewHelper
Class is not designed to handle nested IPC. Regular flows also does not
expect them. Still during printing of plugging them may show message
boxes and start nested message loops.
For now... | 0 | 16,664 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo)
{
Sg_request *srp;
int val;
unsigned int ms;
val = 0;
list_for_each_entry(srp, &sfp->rq_list, entry) {
if (val > SG_MAX_QUEUE)
break;
memset(&rinfo[val], 0, SZ_SG_REQ_INFO);
rinfo[val].req_state = srp->done + 1;
rinfo[val].problem =
... | 1 | 10,142 |
Analyze the following 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 SimplifiedBackwardsTextIterator::emitCharacter(UChar c, Node* node, int startOffset, int endOffset)
{
m_singleCharacterBuffer = c;
m_positionNode = node;
m_positionStartOffset = startOffset;
m_positionEndOffset = endOffset;
m_textCharacters = &m_singleCharacterBuffer;
m_textLength = 1... | 0 | 29,363 |
Analyze the following 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 rds_rdma_pages(struct rds_iovec iov[], int nr_iovecs)
{
int tot_pages = 0;
unsigned int nr_pages;
unsigned int i;
/* figure out the number of pages in the vector */
for (i = 0; i < nr_iovecs; i++) {
nr_pages = rds_pages_in_vec(&iov[i]);
if (nr_pages == 0)
return -EINVAL;
tot_pages += nr... | 0 | 20,356 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void MediaStreamDispatcherHost::StopStreamDevice(const std::string& device_id,
int32_t session_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
media_stream_manager_->StopStreamDevice(render_process_id_, render_frame_id_,
... | 1 | 24,964 |
Analyze the following 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 VerifyDirectoryService(GDataDirectoryService* directory_service) {
ASSERT_TRUE(directory_service->root());
GDataDirectory* dir1 = FindDirectory(directory_service, "drive/dir1");
ASSERT_TRUE(dir1);
GDataDirectory* dir2 = FindDirectory(directory_service, "drive/dir2");
ASSERT_TRUE(dir2);
GDataDire... | 0 | 1,275 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: timeout_auto_reconnect (server *serv)
{
if (is_server (serv)) /* make sure it hasnt been closed during the delay */
{
serv->recondelay_tag = 0;
if (!serv->connected && !serv->connecting && serv->server_session)
{
server_connect (serv, serv->hostname, serv->port, FALSE);
}
}
return 0; /* return... | 0 | 11,640 |
Analyze the following 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 AppCacheNamespace* AppCache::FindNamespace(
const std::vector<AppCacheNamespace>& namespaces,
const GURL& url) {
size_t count = namespaces.size();
for (size_t i = 0; i < count; ++i) {
if (namespaces[i].IsMatch(url))
return &namespaces[i];
}
return nullptr;
}
Commit Message: Reland... | 0 | 5,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: static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev,
int dir)
{
u8 pgid, up_map, prio, tc_pct;
const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG;
struct nlattr *pg = nla_nest_start(skb, i);
if (!pg)
return -EMSGSIZE;
for... | 0 | 22,670 |
Analyze the following 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 HTMLFormControlElement::isRequired() const
{
return m_isRequired;
}
Commit Message: Add HTMLFormControlElement::supportsAutofocus to fix a FIXME comment.
This virtual function should return true if the form control can hanlde
'autofocucs' attribute if it is specified.
Note: HTMLInputElement::supportsA... | 0 | 13,705 |
Analyze the following 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 LaunchPermissionUpdateInfoBar(
JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jobject>& tab,
const JavaParamRef<jstring>& jpermission,
jlong callback_id) {
TabAndroid* tab_android = TabAndroid::GetNativeTab(env, tab);
std::string permission =
base::an... | 0 | 28,368 |
Analyze the following 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 Editor::ApplyParagraphStyle(StylePropertySet* style,
InputEvent::InputType input_type) {
if (GetFrame()
.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.IsNone() ||
!style)
return;
DCHECK(GetFrame().GetDocument());
Appl... | 0 | 22,117 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void __init e820_add_kernel_range(void)
{
u64 start = __pa_symbol(_text);
u64 size = __pa_symbol(_end) - start;
/*
* Complain if .text .data and .bss are not marked as E820_RAM and
* attempt to fix it by adding the range. We may have a confused BIOS,
* or the user may have used memmap=exactmap or... | 0 | 14,753 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rend_service_poison_new_single_onion_dir(const rend_service_t *s,
const or_options_t* options)
{
/* Passing a NULL service is a bug */
if (BUG(!s)) {
return -1;
}
/* We must only poison directories if we're in Single Onion mode */
tor_assert(rend_service_non... | 0 | 22,803 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void cpu_load_update_periodic(struct rq *this_rq, unsigned long load)
{
#ifdef CONFIG_NO_HZ_COMMON
/* See the mess around cpu_load_update_nohz(). */
this_rq->last_load_update_tick = READ_ONCE(jiffies);
#endif
cpu_load_update(this_rq, load, 1);
}
Commit Message: sched/fair: Fix infinite loop in update_b... | 0 | 29,025 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AcpiDsIsResultUsed (
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState)
{
const ACPI_OPCODE_INFO *ParentInfo;
ACPI_FUNCTION_TRACE_PTR (DsIsResultUsed, Op);
/* Must have both an Op and a Result Object */
if (!Op)
{
ACPI_ERROR ((AE_INFO, "Null Op"));
re... | 0 | 14,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 DesktopWindowTreeHostX11::SetWindowIcons(
const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
std::vector<unsigned long> data;
if (!window_icon.isNull())
SerializeImageRepresentation(window_icon.GetRepresentation(1.0f), &data);
if (!app_icon.isNull())
SerializeImageRepres... | 0 | 11,984 |
Analyze the following 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_mmx_support(void)
{
/* Obsolete, to be removed from libpng-1.4.0 */
return -1;
}
Commit Message: third_party/libpng: update to 1.2.54
TBR=darin@chromium.org
BUG=560291
Review URL: https://codereview.chromium.org/1467263003
Cr-Commit-Position: refs/heads/master@{#362298}
CWE ID: CWE-119 | 0 | 24,246 |
Analyze the following 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 uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size)
{
XHCIState *xhci = ptr;
uint32_t ret;
switch (reg) {
case 0x00: /* HCIVERSION, CAPLENGTH */
ret = 0x01000000 | LEN_CAP;
break;
case 0x04: /* HCSPARAMS 1 */
ret = ((xhci->numports_2+xhci->numports_3)<<... | 0 | 17,357 |
Analyze the following 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 RenderWidgetHostViewAura::OnFocus(aura::Window* old_focused_window) {
if (host_->ignore_input_events())
return;
host_->GotFocus();
host_->SetActive(true);
ui::InputMethod* input_method = GetInputMethod();
if (input_method) {
input_method->SetFocusedTextInputClient(this);
host_->SetInp... | 0 | 3,894 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *unk_chunk = arg;
struct sctp_chunk *err_chunk;
sctp_chunkh... | 0 | 1,530 |
Analyze the following 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 dousers(void) {
struct passwd *pw;
struct group *gr;
gchar* str;
if(rungroup) {
gr=getgrnam(rungroup);
if(!gr) {
str = g_strdup_printf("Invalid group name: %s", rungroup);
err(str);
}
if(setgid(gr->gr_gid)<0) {
err("Could not set GID: %m");
}
}
if(runuser) {
pw=getpwnam(runuser);
... | 0 | 21,415 |
Analyze the following 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::GetInterface(mojo::InterfaceRequest<Interface> request) {
GetRemoteInterfaces()->GetInterface(std::move(request));
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://... | 0 | 14,533 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __d_unalias(struct inode *inode,
struct dentry *dentry, struct dentry *alias)
{
struct mutex *m1 = NULL, *m2 = NULL;
int ret = -ESTALE;
/* If alias and dentry share a parent, then no extra locks required */
if (alias->d_parent == dentry->d_parent)
goto out_unalias;
/* See lock_rename() */
i... | 0 | 14,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: set_required_caps (void)
{
struct __user_cap_header_struct hdr = { _LINUX_CAPABILITY_VERSION_3, 0 };
struct __user_cap_data_struct data[2] = { { 0 } };
/* Drop all non-require capabilities */
data[0].effective = REQUIRED_CAPS_0;
data[0].permitted = REQUIRED_CAPS_0;
data[0].inheritable = 0;
data[1].... | 0 | 25,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: static bool is_good_origin(const char *origin, const char *require)
{
size_t origin_len = strlen(origin);
size_t require_len = strlen(require);
if (origin_len < require_len)
return false;
if (memcmp(origin + (origin_len - require_len), require, require_len) != 0)
return false;
... | 0 | 14,403 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: IntSize AcceleratedStaticBitmapImage::Size() const {
return texture_holder_->Size();
}
Commit Message: Fix *StaticBitmapImage ThreadChecker and unaccelerated SkImage destroy
- AcceleratedStaticBitmapImage was misusing ThreadChecker by having its
own detach logic. Using proper DetachThread is simpler, cleaner ... | 0 | 3,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: net::Error ResourceDispatcherHostImpl::BeginDownload(
scoped_ptr<net::URLRequest> request,
bool is_content_initiated,
ResourceContext* context,
int child_id,
int route_id,
bool prefer_cache,
const DownloadSaveInfo& save_info,
const DownloadStartedCallback& started_callback) {
if ... | 0 | 12,389 |
Analyze the following 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 MagickBooleanType GetBlobError(const Image *image)
{
assert(image != (const Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
return(image->blob->status);
}
Commit Me... | 0 | 3,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: ProcRenderChangePicture(ClientPtr client)
{
PicturePtr pPicture;
REQUEST(xRenderChangePictureReq);
int len;
REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
len = client->req_len - bytes_to_int32(sizeof(xRenderChangePict... | 0 | 17,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: void module_data_cleanup(pam_handle_t *pamh, void *data, int error_status)
{
struct module_data *module_data = data;
if (module_data) {
if (1 == module_data->module_loaded) {
PKCS11_release_all_slots(module_data->ctx, module_data->slots, module_data->nslots);
PKCS11_CTX_unload(module_data->ctx);
}
P... | 0 | 25,070 |
Analyze the following 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(snmpset)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_SET, SNMP_VERSION_1);
}
Commit Message:
CWE ID: CWE-416 | 0 | 20,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: cmsBool Type_LUT16_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number nTabSize;
cmsPipeline* NewLUT = (cmsPipeline*) Ptr;
cmsStage* mpe;
_cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL;
_cmsStageMatrixData* MatMPE = NULL;... | 0 | 2,829 |
Analyze the following 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 WebGLRenderingContextBase::TexImageByGPU(
TexImageFunctionID function_id,
WebGLTexture* texture,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
CanvasImageSource* image,
const IntRect& source_sub_rectangle) {
DCHECK(image->IsCanvasElement() || i... | 0 | 12,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: v8::Handle<v8::Value> V8DirectoryEntry::getDirectoryCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DirectoryEntry.getDirectory");
DirectoryEntry* imp = V8DirectoryEntry::toNative(args.Holder());
if (args.Length() < 1)
return V8Proxy::throwNotEnoughArgumentsError();
STRING_TO_V... | 1 | 16,765 |
Analyze the following 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 netif_reset_xps_queues(struct net_device *dev, u16 offset,
u16 count)
{
struct xps_dev_maps *dev_maps;
int cpu, i;
bool active = false;
mutex_lock(&xps_map_mutex);
dev_maps = xmap_dereference(dev->xps_maps);
if (!dev_maps)
goto out_no_maps;
for_each_possible_cpu(cpu)
active |= rem... | 0 | 1,846 |
Analyze the following 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 bpf_register_map_type(struct bpf_map_type_list *tl)
{
list_add(&tl->list_node, &bpf_map_types);
}
Commit Message: bpf: fix refcnt overflow
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK,
the malicious application may overflow 32-bit bpf program refcnt.
It's also possible to overf... | 0 | 11,150 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TestPrerenderContents(
PrerenderManager* prerender_manager,
Profile* profile,
const GURL& url,
const GURL& referrer,
int number_of_loads,
FinalStatus expected_final_status)
: PrerenderContents(prerender_manager, profile, url, referrer),
number_of_loads_(0),
... | 0 | 24,051 |
Analyze the following 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::GetPrintPresetOptionsFromDocument(
PP_PdfPrintPresetOptions_Dev* options) {
options->is_scaling_disabled = PP_FromBool(IsPrintScalingDisabled());
options->duplex =
static_cast<PP_PrivateDuplexMode_Dev>(engine_->GetDuplexType());
options->copies = engine_->GetCopiesToPrin... | 0 | 23,891 |
Analyze the following 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 mskwajd_header *kwajd_open(struct mskwaj_decompressor *base,
const char *filename)
{
struct mskwaj_decompressor_p *self = (struct mskwaj_decompressor_p *) base;
struct mskwajd_header *hdr;
struct mspack_system *sys;
struct mspack_file *fh;
if (!self) return NULL;
sys =... | 0 | 19,427 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sshkey_load_cert(const char *filename, struct sshkey **keyp)
{
struct sshkey *pub = NULL;
char *file = NULL;
int r = SSH_ERR_INTERNAL_ERROR;
if (keyp != NULL)
*keyp = NULL;
if (asprintf(&file, "%s-cert.pub", filename) == -1)
return SSH_ERR_ALLOC_FAIL;
if ((pub = sshkey_new(KEY_UNSPEC)) == NULL) {
g... | 0 | 11,847 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: FakeBluetoothAgentManagerClient::~FakeBluetoothAgentManagerClient() {
}
Commit Message: Refactor to support default Bluetooth pairing delegate
In order to support a default pairing delegate we need to move the agent
service provider delegate implementation from BluetoothDevice to
BluetoothAdapter while retainin... | 0 | 6,006 |
Analyze the following 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 proto_seq_open(struct inode *inode, struct file *file)
{
return seq_open_net(inode, file, &proto_seq_ops,
sizeof(struct seq_net_private));
}
Commit Message: net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()
We need to validate the number of pages consumed by data_le... | 0 | 83 |
Analyze the following 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 fwnet_fifo_stop(struct fwnet_device *dev)
{
if (dev->local_fifo == FWNET_NO_FIFO_ADDR)
return;
fw_core_remove_address_handler(&dev->handler);
dev->local_fifo = FWNET_NO_FIFO_ADDR;
}
Commit Message: firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked inp... | 0 | 16,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 Instance::LoadUrlInternal(const std::string& url, pp::URLLoader* loader,
void (Instance::* method)(int32_t)) {
pp::URLRequestInfo request(this);
request.SetURL(url);
request.SetMethod("GET");
*loader = CreateURLLoaderInternal();
pp::CompletionCallback callback = load... | 0 | 5,207 |
Analyze the following 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 snd_compr_stop(struct snd_compr_stream *stream)
{
int retval;
if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED ||
stream->runtime->state == SNDRV_PCM_STATE_SETUP)
return -EPERM;
retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP);
if (!retval) {
stream->runtime->state = SNDR... | 0 | 25,528 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virtual void DidReceiveDataForClient(const char* data, unsigned data_length) {
if (!data_length)
return;
raw_data_->Append(data, data_length);
}
Commit Message: DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
inst... | 0 | 8,404 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GfxPatternColorSpace::~GfxPatternColorSpace() {
if (under) {
delete under;
}
}
Commit Message:
CWE ID: CWE-189 | 0 | 654 |
Analyze the following 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_read_ext_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr *buff_addr)
{
union e1000_rx_desc_extended *d = (union e1000_rx_desc_extended *) desc;
*buff_addr = le64_to_cpu(d->read.buffer_addr);
}
Commit Message:
CWE ID: CWE-835 | 0 | 24,828 |
Analyze the following 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 muscle_delete_mscfs_file(sc_card_t *card, mscfs_file_t *file_data)
{
mscfs_t *fs = MUSCLE_FS(card);
msc_id id = file_data->objectId;
u8* oid = id.id;
int r;
if(!file_data->ef) {
int x;
mscfs_file_t *childFile;
/* Delete children */
mscfs_check_cache(fs);
sc_debug(card->ctx, SC_LOG_DEBU... | 0 | 2,867 |
Analyze the following 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 SVGError(void *context,const char *format,...)
{
char
*message,
reason[MaxTextExtent];
SVGInfo
*svg_info;
va_list
operands;
/*
Display and format a error formats, gives file, line, position and
extra parameters.
*/
va_start(operands,format);
svg_info=(SVGInfo *... | 0 | 5,820 |
Analyze the following 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<base::ListValue> HostCache::GetAsListValue(
bool include_staleness) const {
std::unique_ptr<base::ListValue> entry_list(new base::ListValue());
for (const auto& pair : entries_) {
const Key& key = pair.first;
const Entry& entry = pair.second;
std::unique_ptr<base::Dictionary... | 0 | 13,221 |
Analyze the following 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 close_cmd_fd(int h)
{
if(ts[h].cmd_fdr != -1)
{
close(ts[h].cmd_fdr);
ts[h].cmd_fdr = -1;
}
if(ts[h].cmd_fdw != -1)
{
close(ts[h].cmd_fdw);
ts[h].cmd_fdw = -1;
}
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bu... | 0 | 3,266 |
Analyze the following 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 rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id)
{
UINT16 initiator;
enum DomainMCSPDU MCSPDU;
MCSPDU = (rdp->settings->ServerMode) ? DomainMCSPDU_SendDataRequest : DomainMCSPDU_SendDataIndication;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, length))
{
if (MCSPDU != Dom... | 0 | 9,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: int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
int len, const void *val)
{
int idx;
struct kvm_io_bus *bus;
struct kvm_io_range range;
range = (struct kvm_io_range) {
.addr = addr,
.len = len,
};
bus = srcu_dereference(kvm->buses[bus_idx], &kvm->srcu);
idx = kvm_io_bus... | 0 | 7,442 |
Analyze the following 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 mix_pool_bytes(struct entropy_store *r, const void *in, int bytes)
{
mix_pool_bytes_extract(r, in, bytes, NULL);
}
Commit Message: net: Compute protocol sequence numbers and fragment IDs using MD5.
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use cu... | 0 | 20,775 |
Analyze the following 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 *date_format(char *format, int format_len, timelib_time *t, int localtime)
{
smart_str string = {0};
int i, length = 0;
char buffer[97];
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
int rfc_colon;
int ... | 0 | 13,916 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int process_backlog(struct napi_struct *napi, int quota)
{
int work = 0;
struct softnet_data *queue = &__get_cpu_var(softnet_data);
unsigned long start_time = jiffies;
napi->weight = weight_p;
do {
struct sk_buff *skb;
local_irq_disable();
skb = __skb_dequeue(&queue->input_pkt_queue);
if (!s... | 0 | 4,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: Page* FrameView::page() const
{
return frame().page();
}
Commit Message: Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea.
updateWidgetPositions() can destroy the render tree, so it should never
be called from inside RenderLayerScrollableArea. Leaving it there allows
for the potent... | 0 | 12,328 |
Analyze the following 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 run_delalloc_range(struct inode *inode, struct page *locked_page,
u64 start, u64 end, int *page_started,
unsigned long *nr_written)
{
int ret;
struct btrfs_root *root = BTRFS_I(inode)->root;
if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) {
ret = run_delalloc_nocow(inode, loc... | 0 | 27,614 |
Analyze the following 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::NativeView RenderWidgetHostViewGuest::BuildInputMethodsGtkMenu() {
NOTIMPLEMENTED();
return gfx::NativeView();
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the ren... | 0 | 6,462 |
Analyze the following 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_copy_gstate(fz_context *ctx, pdf_gstate *gs, pdf_gstate *old)
{
pdf_drop_gstate(ctx, gs);
*gs = *old;
pdf_keep_gstate(ctx, gs);
}
Commit Message:
CWE ID: CWE-416 | 0 | 25,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: static void tun_sock_write_space(struct sock *sk)
{
struct tun_file *tfile;
wait_queue_head_t *wqueue;
if (!sock_writeable(sk))
return;
if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &sk->sk_socket->flags))
return;
wqueue = sk_sleep(sk);
if (wqueue && waitqueue_active(wqueue))
wake_up_interruptible_... | 0 | 23,920 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void write_ivf_file_header(const vpx_codec_enc_cfg_t *const cfg,
int frame_cnt, FILE *const outfile) {
char header[32];
header[0] = 'D';
header[1] = 'K';
header[2] = 'I';
header[3] = 'F';
mem_put_le16(header + 4, 0); /* version */
mem_put_le16(header + 6, 32); /* headersize */
mem_put_le32... | 0 | 11,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: void GLES2DecoderImpl::DoFramebufferTexture2D(
GLenum target, GLenum attachment, GLenum textarget,
GLuint client_texture_id, GLint level) {
FramebufferManager::FramebufferInfo* framebuffer_info =
GetFramebufferInfoForTarget(target);
if (!framebuffer_info) {
SetGLError(GL_INVALID_OPERATION,
... | 0 | 29,320 |
Analyze the following 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 CL_InitRenderer( void ) {
re.BeginRegistration( &cls.glconfig );
cls.charSetShader = re.RegisterShader( "gfx/2d/bigchars" );
cls.whiteShader = re.RegisterShader( "white" );
cls.consoleShader = re.RegisterShader( "console" );
cls.consoleShader2 = re.RegisterShader( "console2" );
g_console_field_width =... | 0 | 26,792 |
Analyze the following 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 f2fs_write_node_page(struct page *page,
struct writeback_control *wbc)
{
return __write_node_page(page, false, NULL, wbc);
}
Commit Message: f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocat... | 0 | 13,245 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: vmnc_handle_wmvg_rectangle (GstVMncDec * dec, struct RfbRectangle *rect,
const guint8 * data, int len, gboolean decode)
{
/* Keyboard stuff; not interesting for playback */
if (len < 10) {
GST_LOG_OBJECT (dec, "Keyboard data too short");
return ERROR_INSUFFICIENT_DATA;
}
return 10;
}
Commit M... | 0 | 8,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: void Document::AdjustFloatRectForScrollAndAbsoluteZoom(
FloatRect& rect,
const LayoutObject& layout_object) const {
if (!View())
return;
LayoutRect visible_content_rect(View()->VisibleContentRect());
rect.Move(-FloatSize(visible_content_rect.X().ToFloat(),
visible_content... | 0 | 6,509 |
Analyze the following 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 reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAttr)));
}
Commit Message: docu... | 0 | 11,745 |
Analyze the following 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 security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len)
{
return security_sid_to_context_core(sid, scontext, scontext_len, 0);
}
Commit Message: SELinux: Fix kernel BUG on empty security contexts.
Setting an empty security context (length=0) on a file will
lead to incorrectly dereferencing th... | 0 | 17,895 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dist_pb(PG_FUNCTION_ARGS)
{
Point *pt = PG_GETARG_POINT_P(0);
BOX *box = PG_GETARG_BOX_P(1);
float8 result;
Point *near;
near = DatumGetPointP(DirectFunctionCall2(close_pb,
PointPGetDatum(pt),
BoxPGetDatum(box)));
result = point_dt(near, pt);
PG_RETURN_FLOAT8(result);... | 0 | 20,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: static void spl_array_set_array(zval *object, spl_array_object *intern, zval **array, long ar_flags, int just_array TSRMLS_DC) {
if (Z_TYPE_PP(array) == IS_ARRAY) {
SEPARATE_ZVAL_IF_NOT_REF(array);
}
if (Z_TYPE_PP(array) == IS_OBJECT && (Z_OBJ_HT_PP(array) == &spl_handler_ArrayObject || Z_OBJ_HT_PP(array) ... | 0 | 27,452 |
Analyze the following 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 DateTimeFieldElement::initialize(const AtomicString& pseudo, const String& axHelpText, int axMinimum, int axMaximum)
{
setAttribute(aria_helpAttr, axHelpText);
setAttribute(aria_valueminAttr, String::number(axMinimum));
setAttribute(aria_valuemaxAttr, String::number(axMaximum));
setPseudo(pse... | 0 | 386 |
Analyze the following 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 vga_common_reset(VGACommonState *s)
{
s->sr_index = 0;
memset(s->sr, '\0', sizeof(s->sr));
memset(s->sr_vbe, '\0', sizeof(s->sr_vbe));
s->gr_index = 0;
memset(s->gr, '\0', sizeof(s->gr));
s->ar_index = 0;
memset(s->ar, '\0', sizeof(s->ar));
s->ar_flip_flop = 0;
s->cr_index... | 0 | 23,052 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TestDataReductionProxyConfig* config() const {
return drp_test_context_->config();
}
Commit Message: Implicitly bypass localhost when proxying requests.
This aligns Chrome's behavior with the Windows and macOS proxy resolvers (but not Firefox).
Concretely:
* localhost names (as determined by net::IsLo... | 0 | 28,399 |
Analyze the following 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 LayerTreeHost::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
proxy_->SetNeedsRedraw(damage_rect);
}
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... | 0 | 22,304 |
Analyze the following 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 cmd_visual(void *data, const char *input) {
RCore *core = (RCore*) data;
if (core->http_up) {
return false;
}
if (!r_config_get_i (core->config, "scr.interactive")) {
return false;
}
return r_core_visual ((RCore *)data, input);
}
Commit Message: Fix #7727 - undefined pointers and out of band... | 0 | 7,215 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MockRenderCallback() {}
Commit Message: Revert r157378 as it caused WebRTC to dereference null pointers when restarting a call.
I've kept my unit test changes intact but disabled until I get a proper fix.
BUG=147499,150805
TBR=henrika
Review URL: https://codereview.chromium.org/10946040
git-svn-id: svn://s... | 0 | 2,861 |
Analyze the following 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 asymmetric_key_cleanup(void)
{
unregister_key_type(&key_type_asymmetric);
}
Commit Message: KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by t... | 0 | 27,243 |
Analyze the following 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 vmcs12_save_pending_event(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
u32 idt_vectoring;
unsigned int nr;
if (vcpu->arch.exception.injected) {
nr = vcpu->arch.exception.nr;
idt_vectoring = nr | VECTORING_INFO_VALID_MASK;
if (kvm_exception_is_soft(nr)) {
vmcs12->vm_exit_ins... | 0 | 13,350 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t MediaHTTP::getSize(off64_t *size) {
if (mInitCheck != OK) {
return mInitCheck;
}
if (!mCachedSizeValid) {
mCachedSize = mHTTPConnection->getSize();
mCachedSizeValid = true;
}
*size = mCachedSize;
return *size < 0 ? *size : static_cast<status_t>(OK);
}
Commit Message: Fix free-... | 0 | 10,239 |
Analyze the following 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 RenderFlexibleBox::firstLineBoxBaseline() const
{
if (isWritingModeRoot() || m_numberOfInFlowChildrenOnFirstLine <= 0)
return -1;
RenderBox* baselineChild = 0;
int childNumber = 0;
for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) {
if (chi... | 0 | 2,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 LocalDOMWindow::PrintErrorMessage(const String& message) const {
if (!IsCurrentlyDisplayedInFrame())
return;
if (message.IsEmpty())
return;
GetFrameConsole()->AddMessage(
ConsoleMessage::Create(kJSMessageSource, kErrorMessageLevel, message));
}
Commit Message: MacViews: Enable secure t... | 0 | 8,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 void sctp_cmd_set_sk_err(struct sctp_association *asoc, int error)
{
struct sock *sk = asoc->base.sk;
if (!sctp_style(sk, UDP))
sk->sk_err = error;
}
Commit Message: sctp: Prevent soft lockup when sctp_accept() is called during a timeout event
A case can occur when sctp_accept() is called by the use... | 0 | 10,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: coolkey_v1_get_attribute_data(const u8 *attr, size_t buf_len, sc_cardctl_coolkey_attribute_t *attr_out)
{
int r;
size_t len;
coolkey_attribute_header_t *attribute_head = (coolkey_attribute_header_t *)attr;
if (buf_len < sizeof(coolkey_attribute_header_t)) {
return SC_ERROR_CORRUPTED_DATA;
}
/* we must h... | 0 | 22,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: void OutOfProcessInstance::DocumentLoadFailed() {
DCHECK(document_load_state_ == LOAD_STATE_LOADING);
UserMetricsRecordAction("PDF.LoadFailure");
if (did_call_start_loading_) {
pp::PDF::DidStopLoading(this);
did_call_start_loading_ = false;
}
document_load_state_ = LOAD_STATE_FAILED;
paint_m... | 0 | 15,745 |
Analyze the following 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_assoc_name_entry(zval * val, char * key, X509_NAME * name, int shortname) /* {{{ */
{
zval *data;
zval subitem, tmp;
int i;
char *sname;
int nid;
X509_NAME_ENTRY * ne;
ASN1_STRING * str = NULL;
ASN1_OBJECT * obj;
if (key != NULL) {
array_init(&subitem);
} else {
ZVAL_COPY_VALUE(&sub... | 0 | 17,010 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebMediaPlayerImpl::RecordVideoNaturalSize(const gfx::Size& natural_size) {
media_log_->AddEvent(media_log_->CreateVideoSizeSetEvent(
natural_size.width(), natural_size.height()));
if (initial_video_height_recorded_)
return;
initial_video_height_recorded_ = true;
int height = natural_siz... | 0 | 21,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: GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(target);
if (!framebuffer) {
return GL_FRAMEBUFFER_COMPLETE;
}
GLenum completeness = framebuffer->IsPossiblyComplete();
if (completeness != GL_FRAMEBUFFER_COMPLETE) {
r... | 0 | 12,854 |
Analyze the following 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::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset)
{
if (!size().isEmpty())
rects.append(LayoutRect(additionalOffset, size()));
}
Commit Message: Source/WebCore: Fix for bug 64046 - Wrong image height in absolutely positioned div in
relatively positioned... | 0 | 8,054 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.