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: render_subrect (GstVMncDec * dec, int x, int y, int width,
int height, guint32 colour)
{
/* Crazy inefficient! */
int i, j;
guint8 *dst;
for (i = 0; i < height; i++) {
dst = dec->imagedata + dec->format.stride * (y + i) +
dec->format.bytes_per_pixel * x;
for (j = 0; j < width; j++) {
... | 0 | 13,665 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
EC_POINT *points[], BN_CTX *ctx)
{
size_t i;
if (group->meth->points_make_affine == 0) {
ECerr(EC_F_EC_POINTS_MAKE_AFFINE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
for (i = 0; i < num; i+... | 0 | 12,085 |
Analyze the following 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 PermissionsData::CanAccessPage(const Extension* extension,
const GURL& document_url,
int tab_id,
std::string* error) const {
AccessType result = GetPageAccess(extension, document_url, tab_id, error);... | 0 | 155,684 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: poppler_mapping_free (PopplerLinkMapping *mapping)
{
poppler_action_free (mapping->action);
g_free (mapping);
}
Commit Message:
CWE ID: CWE-189 | 0 | 766 |
Analyze the following 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 smb_dump(const char *name, int type, const char *data, ssize_t len)
{
int fd, i;
char *fname = NULL;
if (DEBUGLEVEL < 50) {
return;
}
if (len < 4) len = smb_len(data)+4;
for (i=1;i<100;i++) {
if (asprintf(&fname, "/tmp/%s.%d.%s", name, i,
type ? "req" : "resp") == -1) {
return;
... | 0 | 11,075 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: usage(void)
{
int i;
fprintf(stderr, "\n%s\n", TIFFGetVersion());
for (i = 0; usage_info[i] != NULL; i++)
fprintf(stderr, "%s\n", usage_info[i]);
exit(-1);
}
Commit Message: * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel ... | 0 | 48,285 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
{
gdIOCtx *out = gdNewFileCtx (outFile);
if (out == NULL) return;
_gdImageGd2 (im, out, cs, fmt);
out->gd_free (out);
}
Commit Message: gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corru... | 0 | 54,457 |
Analyze the following 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 __attribute__((no_instrument_function)) trace_swap_gd(void)
{
volatile void *temp_gd = trace_gd;
trace_gd = gd;
gd = temp_gd;
}
Commit Message: Merge branch '2020-01-22-master-imports'
- Re-add U8500 platform support
- Add bcm968360bg support
- Assorted Keymile fixes
- Other assorted bugfixes
CW... | 0 | 89,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: status_t Parcel::continueWrite(size_t desired)
{
size_t objectsSize = mObjectsSize;
if (desired < mDataSize) {
if (desired == 0) {
objectsSize = 0;
} else {
while (objectsSize > 0) {
if (mObjects[objectsSize-1] < desired)
break;
objectsSize--;
}
}
}
if (mOwner) {
if (desir... | 0 | 157,255 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: debug_print_property (SmProp *prop)
{
GString *tmp;
int i;
switch (prop->type[0]) {
case 'C': /* CARD8 */
g_debug ("GsmXSMPClient: %s = %d", prop->name, *(unsigned char *)prop->vals[0].value);
break;
case 'A': /* ARRAY8 */
... | 0 | 63,556 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: inject_handler_args(const gchar *actname, const gchar *origargs, const gchar *newargs) {
/*
If actname is one that calls an external command, this function will inject
newargs in front of the user-provided args in that command line. They will
come become after the body of the script (in sh)... | 0 | 18,361 |
Analyze the following 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 bio_reset(struct bio *bio)
{
unsigned long flags = bio->bi_flags & (~0UL << BIO_RESET_BITS);
bio_uninit(bio);
memset(bio, 0, BIO_RESET_BYTES);
bio->bi_flags = flags;
atomic_set(&bio->__bi_remaining, 1);
}
Commit Message: fix unbalanced page refcounting in bio_map_user_iov
bio_map_user_iov and bio_un... | 0 | 62,842 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ChildProcessSecurityPolicyImpl* ChildProcessSecurityPolicyImpl::GetInstance() {
return Singleton<ChildProcessSecurityPolicyImpl>::get();
}
Commit Message: Apply missing kParentDirectory check
BUG=161564
Review URL: https://chromiumcodereview.appspot.com/11414046
git-svn-id: svn://svn.chromium.org/chrome/tru... | 0 | 102,414 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out)
{
#if 0
jp2_pclr_t *pclr = &box->data.pclr;
#endif
/* Eliminate warning about unused variable. */
box = 0;
out = 0;
return -1;
}
Commit Message: Fixed another problem with incorrect cleanup of JP2 box data upon error.
CWE ID: CWE-476 | 0 | 70,375 |
Analyze the following 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 btreeInitPage(MemPage *pPage){
int pc; /* Address of a freeblock within pPage->aData[] */
u8 hdr; /* Offset to beginning of page header */
u8 *data; /* Equal to pPage->aData */
BtShared *pBt; /* The main btree structure */
int usableSize; /* Amount of ... | 0 | 151,671 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool shouldOpenInNewWindow(Frame* targetFrame, const FrameLoadRequest& request, const NavigationAction& action)
{
if (!targetFrame && !request.frameName().isEmpty())
return true;
if (!request.formState())
return false;
NavigationPolicy navigationPolicy = NavigationPolicyCurrentT... | 0 | 111,679 |
Analyze the following 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 DevToolsAgentHostImpl::NotifyNavigated() {
for (auto& observer : g_devtools_observers.Get())
observer.DevToolsAgentHostNavigated(this);
}
Commit Message: [DevTools] Do not allow chrome.debugger to attach to web ui pages
If the page navigates to web ui, we force detach the debugger extension.
TBR=ale... | 0 | 155,767 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t MediaRecorder::setPreviewSurface(const sp<IGraphicBufferProducer>& surface)
{
ALOGV("setPreviewSurface(%p)", surface.get());
if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED... | 0 | 159,544 |
Analyze the following 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_inode_alloc(
struct xfs_mount *mp,
xfs_ino_t ino)
{
struct xfs_inode *ip;
/*
* if this didn't occur in transactions, we could use
* KM_MAYFAIL and return NULL here on ENOMEM. Set the
* code up to do this anyway.
*/
ip = kmem_zone_alloc(xfs_inode_zone, KM_SLEEP);
if (!ip)
return NULL;
if (in... | 0 | 79,959 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static PHP_FUNCTION(xmlwriter_write_raw)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteRaw, NULL);
}
Commit Message:
CWE ID: CWE-254 | 0 | 15,310 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: buffer_unref (Buffer *buffer)
{
g_assert (buffer->refcount > 0);
buffer->refcount--;
if (buffer->refcount == 0)
{
g_list_free_full (buffer->control_messages, g_object_unref);
g_free (buffer);
}
}
Commit Message: Fix vulnerability in dbus proxy
During the authentication all client data... | 0 | 84,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 hmac_init_tfm(struct crypto_tfm *tfm)
{
struct crypto_shash *parent = __crypto_shash_cast(tfm);
struct crypto_shash *hash;
struct crypto_instance *inst = (void *)tfm->__crt_alg;
struct crypto_shash_spawn *spawn = crypto_instance_ctx(inst);
struct hmac_ctx *ctx = hmac_ctx(parent);
hash = crypto_s... | 0 | 45,794 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: jas_stream_t *jas_stream_fopen(const char *filename, const char *mode)
{
jas_stream_t *stream;
jas_stream_fileobj_t *obj;
int openflags;
/* Allocate a stream object. */
if (!(stream = jas_stream_create())) {
return 0;
}
/* Parse the mode string. */
stream->openmode_ = jas_strtoopenmode(mode);
/* Det... | 0 | 73,203 |
Analyze the following 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 LiveSyncTest::TearDown() {
InProcessBrowserTest::TearDown();
TearDownLocalPythonTestServer();
TearDownLocalTestServer();
}
Commit Message: Use URLFetcher::Create instead of new in http_bridge.cc.
This change modified http_bridge so that it uses a factory to construct
the URLFetcher. Moreover, it m... | 0 | 100,196 |
Analyze the following 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 ati_remote2_kill_urbs(struct ati_remote2 *ar2)
{
usb_kill_urb(ar2->urb[1]);
usb_kill_urb(ar2->urb[0]);
}
Commit Message: Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious de... | 0 | 55,217 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: attr_writer(mrb_state *mrb, mrb_value obj)
{
mrb_value name = mrb_proc_cfunc_env_get(mrb, 0);
mrb_value val;
mrb_get_args(mrb, "o", &val);
mrb_iv_set(mrb, obj, to_sym(mrb, name), val);
return val;
}
Commit Message: `mrb_class_real()` did not work for `BasicObject`; fix #4037
CWE ID: CWE-476 | 0 | 82,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 Navigate(const char* url, int page_id) {
contents()->TestDidNavigate(
contents()->GetRenderViewHost(), page_id, GURL(url),
content::PAGE_TRANSITION_TYPED);
}
Commit Message: Disable crashing OfflineLoadPageTest
TBR=jam@chromium.org
BUG=113219
TEST=none
Review URL: https://chromiumc... | 0 | 107,186 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __init net_dev_init(void)
{
int i, rc = -ENOMEM;
BUG_ON(!dev_boot_phase);
if (dev_proc_init())
goto out;
if (netdev_kobject_init())
goto out;
INIT_LIST_HEAD(&ptype_all);
for (i = 0; i < PTYPE_HASH_SIZE; i++)
INIT_LIST_HEAD(&ptype_base[i]);
if (register_pernet_subsys(&netdev_net_ops))
... | 0 | 32,175 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int strcmpn(const char *s1, const char *s2)
{
int digits, predigits = 0;
const char *ss1, *ss2;
while (1) {
if (*s1 == 0 && *s2 == 0)
return 0;
digits = Xisdigit(*s1) && Xisdigit(*s2);
if (digits && !predigits) {
ss1 = s1;
ss2 = s2;
while (Xisdigit(*ss1) && Xisdigit(*ss2... | 0 | 2,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: LRESULT OmniboxViewWin::OnSetText(const wchar_t* text) {
AutoReset<bool> auto_reset_ignore_ime_messages(&ignore_ime_messages_, true);
return DefWindowProc(WM_SETTEXT, 0, reinterpret_cast<LPARAM>(text));
}
Commit Message: Change omnibox behavior when stripping javascript schema to navigate after stripping the... | 0 | 107,507 |
Analyze the following 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 AutofillManager::RegisterBrowserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(prefs::kAutofillDialogPlacement);
}
Commit Message: Add support for the "uploadrequired" attribute for Autofill query responses
BUG=84693
TEST=unit_tests --gtest_filter=AutofillDownloadTest.QueryAndUploadTest
Revie... | 0 | 100,479 |
Analyze the following 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 ASF_Support::CreatePaddingObject ( std::string* header, const XMP_Uns64 size )
{
if ( ( ! header) || (size < 24) ) return false;
ASF_ObjectBase newObjectBase;
newObjectBase.guid = ASF_Padding_Object;
newObjectBase.size = MakeUns64LE ( size );
header->append ( (const char*)&newObjectBase, kASF_ObjectB... | 0 | 15,915 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebFrameWidget* WebLocalFrameImpl::FrameWidget() const {
return frame_widget_;
}
Commit Message: Do not forward resource timing to parent frame after back-forward navigation
LocalFrame has |should_send_resource_timing_info_to_parent_| flag not to
send timing info to parent except for the first navigation. Thi... | 0 | 145,730 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: user_new (Daemon *daemon,
uid_t uid)
{
User *user;
user = g_object_new (TYPE_USER, NULL);
user->daemon = daemon;
accounts_user_set_uid (ACCOUNTS_USER (user), uid);
return user;
}
Commit Message:
CWE ID: CWE-22 | 0 | 4,742 |
Analyze the following 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 FrameFetchContext::DispatchWillSendRequest(
unsigned long identifier,
ResourceRequest& request,
const ResourceResponse& redirect_response,
Resource::Type resource_type,
const FetchInitiatorInfo& initiator_info) {
if (IsDetached())
return;
if (redirect_response.IsNull()) {
Get... | 0 | 145,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: pipe_write(struct kiocb *iocb, const struct iovec *_iov,
unsigned long nr_segs, loff_t ppos)
{
struct file *filp = iocb->ki_filp;
struct pipe_inode_info *pipe = filp->private_data;
ssize_t ret;
int do_wakeup;
struct iovec *iov = (struct iovec *)_iov;
size_t total_len;
ssize_t chars;
total_len =... | 1 | 166,687 |
Analyze the following 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 destruct_tty_driver(struct kref *kref)
{
struct tty_driver *driver = container_of(kref, struct tty_driver, kref);
int i;
struct ktermios *tp;
if (driver->flags & TTY_DRIVER_INSTALLED) {
/*
* Free the termios and termios_locked structures because
* we don't want to get memory leaks when mo... | 0 | 55,857 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Write_CVT( EXEC_OP_ FT_ULong idx,
FT_F26Dot6 value )
{
CUR.cvt[idx] = value;
}
Commit Message:
CWE ID: CWE-119 | 0 | 10,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: bool V8DOMWrapper::hasInternalFieldsSet(v8::Local<v8::Value> value)
{
if (value.IsEmpty() || !value->IsObject())
return false;
v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
if (object->InternalFieldCount() < v8DefaultWrapperInternalFieldCount)
return false;
c... | 0 | 129,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: base::string16 StripWWW(const base::string16& text) {
const base::string16 www(base::ASCIIToUTF16("www."));
return base::StartsWith(text, www, base::CompareCase::SENSITIVE)
? text.substr(www.length()) : text;
}
Commit Message: Block domain labels made of Cyrillic letters that look alike Latin
Block a ... | 0 | 137,085 |
Analyze the following 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 GLES2DecoderPassthroughImpl::RestoreActiveTexture() const {}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3d... | 0 | 141,811 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSite(
BrowserContext* browser_context,
const GURL& url) {
SiteProcessMap* map = GetSiteProcessMapForBrowserContext(browser_context);
GURL site_url = SiteInstance::GetSiteForURL(browser_context, url);
RenderProcessHost* host = map->FindProce... | 0 | 149,281 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: iakerb_gss_get_mic(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
gss_qop_t qop_req, gss_buffer_t message_buffer,
gss_buffer_t message_token)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
if (ctx->gssc == GSS_C_NO_CONTEXT)
return GSS_S_NO_CO... | 0 | 43,777 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: vcard_apdu_set_class(VCardAPDU *apdu) {
apdu->a_channel = 0;
apdu->a_secure_messaging = 0;
apdu->a_type = apdu->a_cla & 0xf0;
apdu->a_gen_type = VCARD_7816_ISO;
/* parse the class tables 8 & 9 of the 7816-4 Part 4 spec */
switch (apdu->a_type) {
/* we only support the basic types... | 0 | 8,738 |
Analyze the following 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 PixelPacket *QueueAuthenticPixels(Image *image,const ssize_t x,
const ssize_t y,const size_t columns,const size_t rows,
ExceptionInfo *exception)
{
CacheInfo
*restrict cache_info;
const int
id = GetOpenMPThreadId();
assert(image != (Image *) NULL);
assert(image->signature == Mag... | 0 | 73,649 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void vrend_hw_emit_framebuffer_state(struct vrend_context *ctx)
{
static const GLenum buffers[8] = {
GL_COLOR_ATTACHMENT0_EXT,
GL_COLOR_ATTACHMENT1_EXT,
GL_COLOR_ATTACHMENT2_EXT,
GL_COLOR_ATTACHMENT3_EXT,
GL_COLOR_ATTACHMENT4_EXT,
GL_COLOR_ATTACHMENT5_EXT,
GL_CO... | 0 | 9,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: bool HTMLInputElement::isTextType() const
{
return m_inputType->isTextType();
}
Commit Message: Setting input.x-webkit-speech should not cause focus change
In r150866, we introduced element()->focus() in destroyShadowSubtree()
to retain focus on <input> when its type attribute gets changed.
But when x-webki... | 0 | 112,942 |
Analyze the following 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 CookPointers(cmsIT8* it8)
{
int idField, i;
char* Fld;
cmsUInt32Number j;
cmsUInt32Number nOldTable = it8 ->nTable;
for (j=0; j < it8 ->TablesCount; j++) {
TABLE* t = it8 ->Tab + j;
t -> SampleID = 0;
it8 ->nTable = j;
for (idField = 0; idField < t -> nSamples; idField... | 0 | 78,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: static uint8_t ltp_data(NeAACDecStruct *hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
{
uint8_t sfb, w;
ltp->lag = 0;
#ifdef LD_DEC
if (hDecoder->object_type == LD)
{
ltp->lag_update = (uint8_t)faad_getbits(ld, 1
DEBUGVAR(1,142,"ltp_data(): lag_update"));
if ... | 0 | 88,388 |
Analyze the following 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 reds_mig_target_client_disconnect_all(void)
{
RingItem *now, *next;
RING_FOREACH_SAFE(now, next, &reds->mig_target_clients) {
RedsMigTargetClient *mig_client = SPICE_CONTAINEROF(now, RedsMigTargetClient, link);
reds_client_disconnect(mig_client->client);
}
}
Commit Messag... | 0 | 1,907 |
Analyze the following 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 __init igmp_mc_proc_init(void)
{
return register_pernet_subsys(&igmp_net_ops);
}
Commit Message: igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case ... | 0 | 21,598 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::string16 AuthenticatorTimeoutErrorModel::GetStepTitle() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_ERROR_GENERIC_TITLE);
}
Commit Message: chrome/browser/ui/webauthn: long domains may cause a line break.
As requested by UX in [1], allow long host names to split a title into
two lines. This al... | 0 | 142,918 |
Analyze the following 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 ~AsyncUploadTokenCompletionObserver() {
}
Commit Message: Framebuffer clear() needs to consider the situation some draw buffers are disabled.
This is when we expose DrawBuffers extension.
BUG=376951
TEST=the attached test case, webgl conformance
R=kbr@chromium.org,bajones@chromium.org
Review URL: ... | 0 | 121,066 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GURL RenderFrameImpl::GetLoadingUrl() const {
WebDataSource* ds = frame_->dataSource();
if (ds->hasUnreachableURL())
return ds->unreachableURL();
const WebURLRequest& request = ds->request();
return request.url();
}
Commit Message: Connect WebUSB client interface to the devices app
This provides a ... | 0 | 123,128 |
Analyze the following 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 RenderViewImpl::showContextMenu(
WebFrame* frame, const WebContextMenuData& data) {
ContextMenuParams params(data);
if (ShouldUpdateSelectionTextFromContextMenuParams(selection_text_,
selection_text_offset_,
... | 0 | 115,642 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,
const __u64 persist_fid, const __u64 volatile_fid, const __u32 pid,
const __u32 num_lock, struct smb2_lock_element *buf)
{
int rc = 0;
struct smb2_lock_req *req = NULL;
struct kvec iov[2];
struct kvec rsp_iov;
int resp_buf_type;
unsigned int... | 0 | 84,947 |
Analyze the following 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 WebGraphicsContext3DCommandBufferImpl::ensureFramebufferCHROMIUM() {
gl_->Flush();
command_buffer_->EnsureBackbuffer();
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.... | 0 | 106,808 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int tls1_process_sigalgs(SSL *s, const unsigned char *data, int dsize)
{
int idx;
size_t i;
const EVP_MD *md;
CERT *c = s->cert;
TLS_SIGALGS *sigptr;
/* Extension ignored for inappropriate versions */
if (!SSL_USE_SIGALGS(s))
return 1;
/* Should never happen */
if (!c)
return 0;
if (c->peer_sigalg... | 0 | 10,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: static void php_wddx_pop_element(void *user_data, const XML_Char *name)
{
st_entry *ent1, *ent2;
wddx_stack *stack = (wddx_stack *)user_data;
HashTable *target_hash;
zend_class_entry **pce;
zval *obj;
zval *tmp;
TSRMLS_FETCH();
/* OBJECTS_FIXME */
if (stack->top == 0) {
return;
}
if ... | 1 | 168,669 |
Analyze the following 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 AtomicString& Document::alinkColor() const {
return BodyAttributeValue(kAlinkAttr);
}
Commit Message: Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutUpdated() which ... | 0 | 129,934 |
Analyze the following 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 NavigationControllerImpl::ReloadIgnoringCache(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_IGNORING_CACHE);
}
Commit Message: Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof.
BUG=280512
BUG=278899
TEST=See bug for repro steps.
Review URL: https://chromium... | 0 | 111,551 |
Analyze the following 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::CustomCallEpilogueVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_customCallEpilogueVoidMethod");
test_object_v8_internal::CustomCallEpilogueVoidMethodMethod(info);
}
Commit Messa... | 0 | 134,616 |
Analyze the following 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 dev_queue_xmit(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct netdev_queue *txq;
struct Qdisc *q;
int rc = -ENOMEM;
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
rcu_read_lock_bh();
txq = dev_pick_tx(dev, skb);
q = rcu_dereference_bh(txq->qdi... | 0 | 37,997 |
Analyze the following 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 DevToolsAgent::clearBrowserCookies() {
Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93596 0039d316-1... | 0 | 98,827 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void kvm_flush_remote_tlbs(struct kvm *kvm)
{
long dirty_count = kvm->tlbs_dirty;
smp_mb();
if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
++kvm->stat.remote_tlb_flush;
cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
}
Commit Message: KVM: perform an invalid memslot step for gpa base change
PPC must flush... | 0 | 29,077 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType DecodeImage(Image *image,const ssize_t opacity)
{
ExceptionInfo
*exception;
IndexPacket
index;
int
c;
LZWInfo
*lzw_info;
ssize_t
offset,
y;
unsigned char
data_size;
size_t
pass;
/*
Allocate decoder tables.
*/
assert(image != (... | 0 | 71,554 |
Analyze the following 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 SetFilterCallback(const FilterCallback& callback) {
callback_ = callback;
}
Commit Message: When turning a download into a navigation, navigate the right frame
Code changes from Nate Chapin <japhet@chromium.org>
Bug: 926105
Change-Id: I098599394e6ebe7d2fce5af838014297a337d294
Reviewed-on: https://... | 0 | 151,940 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int PVGetDecFramerate(VideoDecControls *decCtrl)
{
VideoDecData *video = (VideoDecData *)decCtrl->videoDecoderData;
return video->frameRate;
}
Commit Message: Fix NPDs in h263 decoder
Bug: 35269635
Test: decoded PoC with and without patch
Change-Id: I636a14360c7801cc5bca63c9cb44d1d235df8fd8
(cherry picked fr... | 0 | 162,445 |
Analyze the following 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 usb_get_descriptor(struct usb_device *dev, unsigned char type,
unsigned char index, void *buf, int size)
{
int i;
int result;
memset(buf, 0, size); /* Make sure we parse really received data */
for (i = 0; i < 3; ++i) {
/* retry on length 0 or error; some devices are flakey */
result = usb_... | 0 | 59,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 size_t macvlan_get_size(const struct net_device *dev)
{
return nla_total_size(4);
}
Commit Message: net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that d... | 0 | 23,807 |
Analyze the following 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 fslib_copy_libs(const char *full_path) {
assert(full_path);
if (arg_debug || arg_debug_private_lib)
printf(" fslib_copy_libs %s\n", full_path);
if (access(full_path, R_OK)) {
if (arg_debug || arg_debug_private_lib)
printf("cannot find %s for private-lib, skipping...\n", full_path);
return;
}... | 1 | 169,657 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: perf_cgroup_set_timestamp(struct task_struct *task,
struct perf_event_context *ctx)
{
struct perf_cgroup *cgrp;
struct perf_cgroup_info *info;
/*
* ctx->lock held by caller
* ensure we do not access cgroup data
* unless we have the cgroup pinned (css_get)
*/
if (!task || !ctx->nr_cgroups)
retu... | 0 | 56,057 |
Analyze the following 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 cmd_set_multiple_mode(IDEState *s, uint8_t cmd)
{
if (s->drive_kind == IDE_CFATA && s->nsector == 0) {
/* Disable Read and Write Multiple */
s->mult_sectors = 0;
} else if ((s->nsector & 0xff) != 0 &&
((s->nsector & 0xff) > MAX_MULT_SECTORS ||
(s->nsector & (s-... | 0 | 6,704 |
Analyze the following 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 WebContext::setCachePath(const QUrl& url) {
DCHECK(!IsInitialized());
DCHECK(url.isLocalFile() || url.isEmpty());
construct_props_->cache_path =
base::FilePath(url.toLocalFile().toStdString());
}
Commit Message:
CWE ID: CWE-20 | 0 | 16,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 AudioRendererHost::DoSendPausedMessage(
media::AudioOutputController* controller) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
AudioEntry* entry = LookupByController(controller);
if (!entry)
return;
Send(new AudioMsg_NotifyStreamStateChanged(
entry->stream_id, media::Audio... | 0 | 118,562 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SelectionController* SelectionController::Create(LocalFrame& frame) {
return new SelectionController(frame);
}
Commit Message: Move SelectionTemplate::is_handle_visible_ to FrameSelection
This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate|
since handle visibility is used only fo... | 0 | 124,908 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int loadingStateToDifferentDocumentCount() const {
return loadingStateToDifferentDocumentCount_;
}
Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen.
BUG=670135, 550017, 726761, 728276
Review-Url: https://codereview.chromium.org/2906133004
Cr-Commit-Position: refs/heads/ma... | 0 | 135,942 |
Analyze the following 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 PrintDialogGtk::UseDefaultSettings() {
DCHECK(!page_setup_);
gtk_settings_ = gtk_print_settings_new();
scoped_ptr<GtkPrinterList> printer_list(new GtkPrinterList);
printer_ = printer_list->default_printer();
if (printer_) {
g_object_ref(printer_);
gtk_print_settings_set_printer(gtk_settin... | 0 | 97,477 |
Analyze the following 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 rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
{
struct rfcomm_dev *dev = dlc->owner;
if (!dev)
return;
BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig);
if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV)) {
if (dev->port.tty && !C_CLOCAL(dev->port.tty))
... | 0 | 94,484 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void nfs4_lock_prepare(struct rpc_task *task, void *calldata)
{
struct nfs4_lockdata *data = calldata;
struct nfs4_state *state = data->lsp->ls_state;
dprintk("%s: begin!\n", __func__);
if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0)
return;
/* Do we need to do an open_to_lock_owner? */
... | 0 | 22,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: int vfs_whiteout(struct inode *dir, struct dentry *dentry)
{
int error = may_create(dir, dentry);
if (error)
return error;
if (!dir->i_op->mknod)
return -EPERM;
return dir->i_op->mknod(dir, dentry,
S_IFCHR | WHITEOUT_MODE, WHITEOUT_DEV);
}
Commit Message: path_openat(): fix double fput()
path_open... | 0 | 42,351 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderView::OnSelectAll() {
if (!webview())
return;
webview()->focusedFrame()->executeCommand(
WebString::fromUTF8("SelectAll"));
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.chr... | 0 | 98,954 |
Analyze the following 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_page_flip_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv)
{
struct drm_mode_crtc_page_flip *page_flip = data;
struct drm_mode_object *obj;
struct drm_crtc *crtc;
struct drm_framebuffer *fb;
struct drm_pending_vblank_event *e = NULL;
unsigned long flags;
int ret = ... | 0 | 21,915 |
Analyze the following 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 ChannelStatistics *GetImageChannelStatistics(const Image *image,
ExceptionInfo *exception)
{
ChannelStatistics
*channel_statistics;
double
area,
standard_deviation;
MagickPixelPacket
number_bins,
*histogram;
QuantumAny
range;
register ssize_t
i;
size_t
... | 0 | 88,932 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GahpClient::gt4_gram_client_job_start(const char * job_contact)
{
static const char* command = "GT4_GRAM_JOB_START";
if (server->m_commands_supported->contains_anycase(command)==FALSE) {
return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
}
if (!job_contact) job_contact=NULLSTRING;
std::string reqline;
int x = sp... | 0 | 16,205 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GLvoid StubGLDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
glDeleteFramebuffersEXT(n, framebuffers);
}
Commit Message: Add chromium_code: 1 to surface.gyp and gl.gyp to pick up -Werror.
It looks like this was dropped accidentally in http://codereview.chromium.org/6718027 (surface.gyp) and http:/... | 0 | 99,554 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: openssl_callback_ignore_crls(int ok, X509_STORE_CTX * ctx)
{
if (!ok) {
switch (ctx->error) {
case X509_V_ERR_UNABLE_TO_GET_CRL:
return 1;
default:
return 0;
}
}
return ok;
}
Commit Message: PKINIT null pointer deref [CVE-2013-1415]
Don't deref... | 0 | 33,643 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void TabStripModel::NotifyIfActiveTabChanged(TabContents* old_contents,
NotifyTypes notify_types) {
TabContents* new_contents = GetTabContentsAtImpl(active_index());
if (old_contents != new_contents) {
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
... | 0 | 118,231 |
Analyze the following 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 SSL_CIPHER *ssl3_get_cipher(unsigned int u)
{
if (u < SSL3_NUM_CIPHERS)
return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]));
else
return (NULL);
}
Commit Message:
CWE ID: CWE-200 | 0 | 13,690 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, __le64 *uniqueid)
{
return query_info(xid, tcon, persistent_fid, volatile_fid,
FILE_INTERNAL_INFORMATION, SMB2_O_INFO_FILE, 0,
sizeof(struct smb2_file_internal_info),
sizeof(struct smb2_file_i... | 0 | 88,073 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static Vector<String> ParseAcceptAttribute(const String& accept_string,
bool (*predicate)(const String&)) {
Vector<String> types;
if (accept_string.IsEmpty())
return types;
Vector<String> split_types;
accept_string.Split(',', false, split_types);
for (cons... | 0 | 126,071 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
struct nfs_closeargs *args)
{
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequence(xdr, &args->seq_args, &hdr);
encode_putfh(xdr, ar... | 0 | 23,454 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderViewHostImpl::CreateNewFullscreenWidget(int route_id) {
delegate_->CreateNewFullscreenWidget(route_id);
}
Commit Message: Filter more incoming URLs in the CreateWindow path.
BUG=170532
Review URL: https://chromiumcodereview.appspot.com/12036002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@... | 0 | 117,161 |
Analyze the following 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 ChromeClientImpl::DidChangeValueInTextField(
HTMLFormControlElement& element) {
Document& doc = element.GetDocument();
if (auto* fill_client = AutofillClientFromFrame(doc.GetFrame()))
fill_client->TextFieldDidChange(WebFormControlElement(&element));
UseCounter::Count(doc, doc.IsSecureContext()... | 0 | 150,921 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str)
{
char** new_keys = (char**)(realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
char** new_strings = (char**)(realloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));
if(!new_keys || !new_strings)
{
... | 0 | 87,501 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
service_manager::BinderRegistry* registry,
blink::AssociatedInterfaceRegistry* associated_registry,
content::RenderProcessHost* render_process_host) {
associated_registry->AddInterface(
base::Bind(&CacheStatsRecorder::Create, render_... | 0 | 152,374 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8ContextNativeHandler::GetAvailability(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK_EQ(args.Length(), 1);
v8::Isolate* isolate = args.GetIsolate();
std::string api_name = *v8::String::Utf8Value(args[0]);
Feature::Availability availability = context_->GetAvailability(api_name);
v... | 0 | 132,639 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void hidp_stop(struct hid_device *hid)
{
struct hidp_session *session = hid->driver_data;
skb_queue_purge(&session->ctrl_transmit);
skb_queue_purge(&session->intr_transmit);
hid->claimed = 0;
}
Commit Message: Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
The length parameter should be siz... | 0 | 33,759 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScriptValue Notification::data(ScriptState* scriptState)
{
if (m_developerData.isEmpty()) {
RefPtr<SerializedScriptValue> serializedValue;
const WebVector<char>& serializedData = m_data.data;
if (serializedData.size())
serializedValue = SerializedScriptValueFactory::instan... | 0 | 119,772 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: u8* h264bsdGetRefPicData(dpbStorage_t *dpb, u32 index)
{
/* Variables */
/* Code */
if(index > 16 || dpb->list[index] == NULL)
return(NULL);
else if(!IS_EXISTING(*dpb->list[index]))
return(NULL);
else
return(dpb->list[index]->data);
}
Commit Message: Fix potential overflow
Bug: 28533562
Change-Id: I79... | 0 | 159,585 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.