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: chash_start(int type, void *base)
{
if (type == HMAC_MD5)
md5_start((md5 *)base);
else
sha1_start((sha1 *)base);
}
Commit Message:
CWE ID: CWE-189 | 0 | 12,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: SPL_METHOD(Array, __construct)
{
zval *object = getThis();
spl_array_object *intern;
zval **array;
long ar_flags = 0;
zend_class_entry *ce_get_iterator = spl_ce_Iterator;
zend_error_handling error_handling;
if (ZEND_NUM_ARGS() == 0) {
return; /* nothing to do */
}
zend_replace_error_handling(EH_THROW... | 0 | 12,336 |
Analyze the following 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 __ext4_block_zero_page_range(handle_t *handle,
struct address_space *mapping, loff_t from, loff_t length)
{
ext4_fsblk_t index = from >> PAGE_CACHE_SHIFT;
unsigned offset = from & (PAGE_CACHE_SIZE-1);
unsigned blocksize, pos;
ext4_lblk_t iblock;
struct inode *inode = mapping->host;
struct buffe... | 0 | 56,531 |
Analyze the following 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 nfs4_free_stateowner(struct nfs4_stateowner *sop)
{
kfree(sop->so_owner.data);
sop->so_ops->so_free(sop);
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA update from Chuck Lever, and a bunch of miscellaneous
... | 0 | 65,521 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledPerContextAttr());
}
Commit Message: document.location bindings fix
BUG=352374
R=jochen@chromium.org
Review ... | 0 | 121,663 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void dump_trace(struct task_struct *task, struct pt_regs *regs,
unsigned long *stack, unsigned long bp,
const struct stacktrace_ops *ops, void *data)
{
const unsigned cpu = get_cpu();
struct thread_info *tinfo;
unsigned long *irq_stack = (unsigned long *)per_cpu(irq_stack_ptr, cpu);
unsigned long dummy;
... | 0 | 35,400 |
Analyze the following 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 IsSigninFrameClientCertUserSelectionEnabled() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
kDisableSigninFrameClientCertUserSelection);
}
Commit Message: Add a fake DriveFS launcher client.
Using DriveFS requires building and deploying ChromeOS. Add a client for
the fake DriveFS lau... | 0 | 124,068 |
Analyze the following 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 SetDescriptor(const std::vector<uint8> descriptor) {
descriptor_ = descriptor;
}
Commit Message: MidiManagerUsb should not trust indices provided by renderer.
MidiManagerUsb::DispatchSendMidiData takes |port_index| parameter. As it is
provided by a renderer possibly under the control of an attacker... | 0 | 128,714 |
Analyze the following 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 ExtensionOptionsGuest::HandleContextMenu(
const content::ContextMenuParams& params) {
if (!extension_options_guest_delegate_)
return false;
return extension_options_guest_delegate_->HandleContextMenu(params);
}
Commit Message: Make extensions use a correct same-origin check.
GURL::GetOrigin do... | 0 | 132,981 |
Analyze the following 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_seq_ioctl_set_client_info(struct snd_seq_client *client,
void __user *arg)
{
struct snd_seq_client_info client_info;
if (copy_from_user(&client_info, arg, sizeof(client_info)))
return -EFAULT;
/* it is not allowed to set the info fields for an another client */
if (client->number != c... | 0 | 54,714 |
Analyze the following 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 bool detach()
{
m_events.append(Detach);
return TRUE;
}
Commit Message: [GTK] Inspector should set a default attached height before being attached
https://bugs.webkit.org/show_bug.cgi?id=90767
Reviewed by Xan Lopez.
We are currently using the minimum attached height in
WebKi... | 0 | 108,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 void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
{
struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
struct pi_desc old, new;
unsigned int dest;
if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
!irq_remapping_cap(IRQ_POSTING_CAP))
return;
do {
old.control = new.control = pi_desc->control;
... | 0 | 42,774 |
Analyze the following 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 sixel_node_del(sixel_output_t *const context, sixel_node_t *np)
{
sixel_node_t *tp;
if ((tp = context->node_top) == np) {
context->node_top = np->next;
}
else {
while (tp->next != NULL) {
if (tp->next == np) {
tp->next = np->next;
... | 0 | 71,700 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebContentsImpl::NotifyWebContentsFocused() {
FOR_EACH_OBSERVER(WebContentsObserver, observers_, OnWebContentsFocused());
}
Commit Message: Don't call WebContents::DownloadImage() callback if the WebContents were deleted
BUG=583718
Review URL: https://codereview.chromium.org/1685343004
Cr-Commit-Positi... | 0 | 131,914 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: oldParseTest(const char *filename, const char *result,
const char *err ATTRIBUTE_UNUSED,
int options ATTRIBUTE_UNUSED) {
xmlDocPtr doc;
char *temp;
int res = 0;
nb_tests++;
/*
* base of the test, parse with the old API
*/
#ifdef LIBXML_SAX1_ENABLED
doc = xmlPa... | 0 | 59,605 |
Analyze the following 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 SoftAAC2::outputDelayRingBufferPutSamples(INT_PCM *samples, int32_t numSamples) {
if (numSamples == 0) {
return true;
}
if (outputDelayRingBufferSpaceLeft() < numSamples) {
ALOGE("RING BUFFER WOULD OVERFLOW");
return false;
}
if (mOutputDelayRingBufferWritePos + numSamples <= mOutputDelayRingB... | 0 | 159,396 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AcpiNsGetNode (
ACPI_NAMESPACE_NODE *PrefixNode,
const char *Pathname,
UINT32 Flags,
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE_PTR (NsGetNode, ACPI_CAST_PTR (char, Pathname));
Status = AcpiUtAcquire... | 0 | 95,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: string_has_highlight_regex_compiled (const char *string, regex_t *regex)
{
int rc, startswith, endswith;
regmatch_t regex_match;
const char *match_pre;
if (!string || !regex)
return 0;
while (string && string[0])
{
rc = regexec (regex, string, 1, ®ex_match, 0);
... | 0 | 7,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 GLES2DecoderImpl::DoGetVertexAttribiv(GLuint index,
GLenum pname,
GLint* params,
GLsizei params_size) {
DoGetVertexAttribImpl<GLint>(index, pname, params);
}
Commit Message: Add... | 0 | 141,335 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: proto_reg_handoff_pktap(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_PKTAP, pktap_handle);
}
Commit Message: The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr.
We now require that. Make it so.
Bug: 12440
Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76
Reviewed-on: https://cod... | 0 | 51,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: void WallpaperManagerBase::CreateSolidDefaultWallpaper() {
loaded_wallpapers_for_test_++;
SkBitmap bitmap;
bitmap.allocN32Pixels(1, 1);
bitmap.eraseColor(kDefaultWallpaperColor);
const gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
default_wallpaper_image_.reset(new user_manager::... | 0 | 128,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: bool HTMLInputElement::isInputTypeHidden() const
{
return m_inputType->isHiddenType();
}
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 whe... | 0 | 112,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: void CursorImpl::Continue(
const IndexedDBKey& key,
const IndexedDBKey& primary_key,
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) {
scoped_refptr<IndexedDBCallbacks> callbacks(
new IndexedDBCallbacks(dispatcher_host_->AsWeakPtr(), origin_,
std::m... | 0 | 135,531 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: iasecc_oberthur_match(struct sc_card *card)
{
struct sc_context *ctx = card->ctx;
unsigned char *hist = card->reader->atr_info.hist_bytes;
LOG_FUNC_CALLED(ctx);
if (*hist != 0x80 || ((*(hist+1)&0xF0) != 0xF0))
LOG_FUNC_RETURN(ctx, SC_ERROR_OBJECT_NOT_FOUND);
sc_log_hex(ctx, "AID in historical_bytes", hi... | 0 | 78,498 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BrowserView::Show() {
if (frame_->IsVisible()) {
frame_->Activate();
return;
}
CreateLauncherIcon();
force_location_bar_focus_ = true;
RestoreFocus();
frame_->Show();
force_location_bar_focus_ = false;
browser()->OnWindowDidShow();
chrome::MaybeShowInvertBubbleView(browser_.g... | 0 | 118,441 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int sock_sendmsg(struct socket *sock, struct msghdr *msg)
{
int err = security_socket_sendmsg(sock, msg,
msg_data_left(msg));
return err ?: sock_sendmsg_nosec(sock, msg);
}
Commit Message: net: Fix use after free in the recvmmsg exit path
The syzkaller fuzzer hit the following use-after-free:
Call ... | 0 | 50,276 |
Analyze the following 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 br_rports_fill_info(struct sk_buff *skb, struct netlink_callback *cb,
struct net_device *dev)
{
struct net_bridge *br = netdev_priv(dev);
struct net_bridge_port *p;
struct nlattr *nest;
if (!br->multicast_router || hlist_empty(&br->router_list))
return 0;
nest = nla_nest_start(skb, M... | 0 | 29,982 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DEFINE_TRACE(FetchContext) {
visitor->Trace(platform_probe_sink_);
}
Commit Message: DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, inste... | 0 | 138,849 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ~NaClGdbWatchDelegate() {
if (HANDLE_EINTR(close(fd_read_)) != 0)
DLOG(ERROR) << "close(fd_read_) failed";
if (HANDLE_EINTR(close(fd_write_)) != 0)
DLOG(ERROR) << "close(fd_write_) failed";
}
Commit Message: Revert 143656 - Add an IPC channel between the NaCl loader process and the render... | 0 | 103,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: static void getInlineRun(RenderObject* start, RenderObject* boundary,
RenderObject*& inlineRunStart,
RenderObject*& inlineRunEnd)
{
RenderObject * curr = start;
bool sawInline;
do {
while (curr && !(curr->isInline() || curr->isFloatingOrOutOfF... | 0 | 116,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 NavigationControllerImpl::RendererDidNavigateToSamePage(
RenderFrameHostImpl* rfh,
const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
NavigationHandleImpl* handle) {
NavigationEntryImpl* existing_entry = GetLastCommittedEntry();
CHECK_EQ(existing_entry->site_instance(), rfh->GetSite... | 0 | 150,397 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ModuleExport size_t RegisterTIFFImage(void)
{
#define TIFFDescription "Tagged Image File Format"
char
version[MagickPathExtent];
MagickInfo
*entry;
if (tiff_semaphore == (SemaphoreInfo *) NULL)
ActivateSemaphoreInfo(&tiff_semaphore);
LockSemaphoreInfo(tiff_semaphore);
if (instantiate_key... | 0 | 71,898 |
Analyze the following 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 qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo)
{
struct qib_ctxt_info info;
int ret;
size_t sz;
struct qib_ctxtdata *rcd = ctxt_fp(fp);
struct qib_filedata *fd;
fd = fp->private_data;
info.num_active = qib_count_active_units();
info.unit = rcd->dd->unit;
info.port = rcd->... | 0 | 52,931 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: parserCreate(const XML_Char *encodingName,
const XML_Memory_Handling_Suite *memsuite,
const XML_Char *nameSep,
DTD *dtd)
{
XML_Parser parser;
if (memsuite) {
XML_Memory_Handling_Suite *mtemp;
parser = (XML_Parser)
memsuite->malloc_fcn(sizeof(struct XML_Par... | 0 | 92,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: void MSG_Init( msg_t *buf, byte *data, int length ) {
if (!msgInit) {
MSG_initHuffman();
}
Com_Memset (buf, 0, sizeof(*buf));
buf->data = data;
buf->maxsize = length;
}
Commit Message: Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read p... | 0 | 63,140 |
Analyze the following 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 TestingAutomationProvider::ConnectToCellularNetwork(
DictionaryValue* args, IPC::Message* reply_message) {
std::string service_path;
if (!args->GetString("service_path", &service_path)) {
AutomationJSONReply(this, reply_message).SendError(
"Invalid or missing args.");
return;
}
N... | 0 | 109,200 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb1;
u32 seq, end_seq;
tcp_ecn_check_ce(tp, skb);
if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPOFODROP);
__kfree_skb(sk... | 0 | 55,385 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: IntRect WebPagePrivate::getRecursiveVisibleWindowRect(ScrollView* view, bool noClipOfMainFrame)
{
ASSERT(m_mainFrame);
if (noClipOfMainFrame && view == m_mainFrame->view()) {
ASSERT_NOT_REACHED();
return IntRect(IntPoint::zero(), view->contentsSize());
}
IntRect visibleWindowRect... | 0 | 104,220 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void plugin_instance_finalize(PluginInstance *plugin)
{
if (plugin->browser_toplevel) {
g_object_unref(plugin->browser_toplevel);
plugin->browser_toplevel = NULL;
}
if (plugin->instance) {
free(plugin->instance);
plugin->instance = NULL;
}
}
Commit Message: Support all the new variables added
... | 0 | 27,167 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebKitTestController::~WebKitTestController() {
DCHECK(CalledOnValidThread());
CHECK(instance_ == this);
CHECK(test_phase_ == BETWEEN_TESTS);
GpuDataManager::GetInstance()->RemoveObserver(this);
DiscardMainWindow();
instance_ = NULL;
}
Commit Message: content: Rename webkit_test_helpers.{cc,h} to bli... | 0 | 123,537 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nautilus_file_invalidate_count_and_mime_list (NautilusFile *file)
{
NautilusFileAttributes attributes;
attributes = NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_COUNT |
NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES;
nautilus_file_invalidate_attributes (file, attributes);
}
Commit Mes... | 0 | 60,978 |
Analyze the following 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 rtsp_cmd_describe(HTTPContext *c, const char *url)
{
FFServerStream *stream;
char path1[1024];
const char *path;
uint8_t *content;
int content_length;
socklen_t len;
struct sockaddr_in my_addr;
/* find which URL is asked */
av_url_split(NULL, 0, NULL, 0, NULL, 0, N... | 0 | 70,826 |
Analyze the following 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 inet_netconf_msgsize_devconf(int type)
{
int size = NLMSG_ALIGN(sizeof(struct netconfmsg))
+ nla_total_size(4); /* NETCONFA_IFINDEX */
bool all = false;
if (type == NETCONFA_ALL)
all = true;
if (all || type == NETCONFA_FORWARDING)
size += nla_total_size(4);
if (all || type == NETCONFA_R... | 0 | 54,089 |
Analyze the following 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 ImageDataNaClBackend::Init(PPB_ImageData_Impl* impl,
PP_ImageDataFormat format,
int width, int height,
bool init_to_zero) {
skia_bitmap_.setConfig(SkBitmap::kARGB_8888_Config,
impl->w... | 0 | 102,384 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pkinit_decode_dh_params(DH ** a, unsigned char **pp, unsigned int len)
{
ASN1_INTEGER ai, *aip = NULL;
long length = (long) len;
M_ASN1_D2I_vars(a, DH *, DH_new);
M_ASN1_D2I_Init();
M_ASN1_D2I_start_sequence();
aip = &ai;
ai.data = NULL;
ai.length = 0;
M_ASN1_D2I_get_x(ASN1_I... | 0 | 33,660 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: char *msPostGISEscapeSQLParam(layerObj *layer, const char *pszString)
{
#ifdef USE_POSTGIS
msPostGISLayerInfo *layerinfo = NULL;
int nError;
size_t nSrcLen;
char* pszEscapedStr =NULL;
if (layer && pszString && strlen(pszString) > 0) {
if(!msPostGISLayerIsOpen(layer))
msPostGISLayerOpen(layer)... | 0 | 40,815 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ClientGpuFence GpuFence::AsClientGpuFence() {
return reinterpret_cast<ClientGpuFence>(this);
}
Commit Message: gfx: Add GpuFence::Wait() method
Provide a GpuFence::Wait() method to hide the implementation details of
waiting for a GpuFence object.
Bug: 828393
Change-Id: I2153ebcb4b8cca6bb43c827fb0a9740f6a6cc2... | 0 | 131,195 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ROWINDEX CSoundFile::PatternLoop(ModChannel *pChn, uint32 param)
{
if (param)
{
if(pChn->nPatternLoopCount)
{
pChn->nPatternLoopCount--;
if(!pChn->nPatternLoopCount)
{
if(m_playBehaviour[kITPatternLoopTargetReset] || (GetType() == MOD_TYPE_S3M))
{
pChn->nPatternLoop = m_PlayState.m_nRo... | 0 | 83,324 |
Analyze the following 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 inode_sb_list_add(struct inode *inode)
{
spin_lock(&inode_sb_list_lock);
list_add(&inode->i_sb_list, &inode->i_sb->s_inodes);
spin_unlock(&inode_sb_list_lock);
}
Commit Message: fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; ... | 0 | 36,874 |
Analyze the following 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_head (void *data, const char *_input) { // "head"
RCore *core = (RCore *)data;
int lines = 5;
char *input = strdup (_input);
char *arg = strchr (input, ' ');
char *tmp, *count;
if (arg) {
arg = (char *)r_str_trim_ro (arg + 1); // contains "count filename"
count = strchr (arg, ' ');
if ... | 0 | 87,780 |
Analyze the following 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_object_property_dump(zval *zv, zend_ulong index, zend_string *key, int level) /* {{{ */
{
const char *prop_name, *class_name;
if (key == NULL) { /* numeric key */
php_printf("%*c[" ZEND_LONG_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
int unmangle = zend_unmangle_propert... | 0 | 72,371 |
Analyze the following 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 raw_cmd_done(int flag)
{
int i;
if (!flag) {
raw_cmd->flags |= FD_RAW_FAILURE;
raw_cmd->flags |= FD_RAW_HARDFAILURE;
} else {
raw_cmd->reply_count = inr;
if (raw_cmd->reply_count > MAX_REPLIES)
raw_cmd->reply_count = 0;
for (i = 0; i < raw_cmd->reply_count; i++)
raw_cmd->reply[i] =... | 0 | 88,839 |
Analyze the following 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 __sched interruptible_sleep_on(wait_queue_head_t *q)
{
sleep_on_common(q, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
}
Commit Message: Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
... | 0 | 22,472 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: kadm5_setkey_principal_4(void *server_handle, krb5_principal principal,
krb5_boolean keepold, kadm5_key_data *key_data,
int n_key_data)
{
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
krb5_timestamp now;
kadm5_policy_ent_rec pol;
krb5_key_data *ne... | 0 | 84,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: static void jslLexRegex() {
lex->tokenValue = jsvNewFromEmptyString();
if (!lex->tokenValue) {
lex->tk = LEX_EOF;
return;
}
JsvStringIterator it;
jsvStringIteratorNew(&it, lex->tokenValue, 0);
jsvStringIteratorAppend(&it, '/');
jslGetNextCh();
while (lex->currCh && lex->currCh!='/') {
... | 0 | 82,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: const char *fz_colorspace_name(fz_context *ctx, const fz_colorspace *cs)
{
return cs ? cs->name : "";
}
Commit Message:
CWE ID: CWE-20 | 0 | 352 |
Analyze the following 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 ivr_read_header(AVFormatContext *s)
{
unsigned tag, type, len, tlen, value;
int i, j, n, count, nb_streams = 0, ret;
uint8_t key[256], val[256];
AVIOContext *pb = s->pb;
AVStream *st;
int64_t pos, offset, temp;
pos = avio_tell(pb);
tag = avio_rl32(pb);
if (tag == MK... | 0 | 74,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 Document::ReportFeaturePolicyViolation(
mojom::FeaturePolicyFeature feature,
mojom::FeaturePolicyDisposition disposition,
const String& message) const {
if (!RuntimeEnabledFeatures::FeaturePolicyReportingEnabled())
return;
LocalFrame* frame = GetFrame();
if (!frame)
return;
const ... | 0 | 152,426 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void* Type_XYZ_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIEXYZ));
cmsUNUSED_PARAMETER(n);
}
Commit Message: Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug
CWE ID: CWE-125 | 0 | 71,076 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Cluster::~Cluster()
{
if (m_entries_count <= 0)
return;
BlockEntry** i = m_entries;
BlockEntry** const j = m_entries + m_entries_count;
while (i != j)
{
BlockEntry* p = *i++;
assert(p);
delete p;
}
delete[] m_entries;
}
Commit Message: libwebm: P... | 1 | 174,458 |
Analyze the following 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 PrintRenderFrameHelper::PrintPreviewContext::HasSelection() {
return IsModifiable() && source_frame()->HasSelection();
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any control over the... | 0 | 149,101 |
Analyze the following 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 pvc_close(struct net_device *dev)
{
pvc_device *pvc = dev->ml_priv;
if (--pvc->open_count == 0) {
hdlc_device *hdlc = dev_to_hdlc(pvc->frad);
if (state(hdlc)->settings.lmi == LMI_NONE)
pvc->state.active = 0;
if (state(hdlc)->settings.dce) {
state(hdlc)->dce_changed = 1;
pvc->state.ac... | 0 | 23,924 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
size_t auxiliary_info_size;
if (c->decryption_key_len == 0 || c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams - 1];
sc = st->priv_data;
if (sc-... | 0 | 61,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: error::Error GLES2DecoderPassthroughImpl::DoStencilThenCoverStrokePathCHROMIUM(
GLuint path,
GLint reference,
GLuint mask,
GLenum coverMode) {
NOTIMPLEMENTED();
return error::kNoError;
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR... | 0 | 142,119 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void DetachWebContentsTest(DiscardReason reason) {
LifecycleUnit* first_lifecycle_unit = nullptr;
LifecycleUnit* second_lifecycle_unit = nullptr;
CreateTwoTabs(true /* focus_tab_strip */, &first_lifecycle_unit,
&second_lifecycle_unit);
ExpectCanDiscardTrueAllReasons(first_life... | 1 | 172,223 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void cleanup_mapped_device(struct mapped_device *md)
{
if (md->wq)
destroy_workqueue(md->wq);
if (md->kworker_task)
kthread_stop(md->kworker_task);
mempool_destroy(md->io_pool);
if (md->bs)
bioset_free(md->bs);
if (md->dax_dev) {
kill_dax(md->dax_dev);
put_dax(md->dax_dev);
md->dax_dev = ... | 0 | 85,860 |
Analyze the following 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 _WM_Release_Allowance(struct _mdi *mdi) {
uint32_t release = 0;
uint32_t longest_release = 0;
struct _note *note = mdi->note;
while (note != NULL) {
if (note->modes & SAMPLE_ENVELOPE) {
if (note->env < 4) {
note->env = 4;
}
... | 0 | 63,220 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GaiaOAuthClient::GaiaOAuthClient(const OAuthProviderInfo& provider_info,
net::URLRequestContextGetter* context_getter) {
core_ = new Core(provider_info, context_getter);
}
Commit Message: Remove UrlFetcher from remoting and use the one in net instead.
BUG=133790
TEST=Stop and ... | 0 | 105,282 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int CLASS fscanf(FILE *stream, const char *format, void *ptr) {
int count = ::fscanf(stream, format, ptr);
if ( count != 1 )
dcraw_message(DCRAW_WARNING, "%s: fscanf %d != 1\n",
ifname_display, count);
return 1;
}
Commit Message: Avoid overflow in ljpeg_start().
CWE ID: CWE-18... | 0 | 43,277 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gx_device_enum_ptr(gx_device * dev)
{
if (dev == 0 || dev->memory == 0)
return 0;
return dev;
}
Commit Message:
CWE ID: CWE-78 | 0 | 2,804 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static unsigned long ptrace_get_dr7(struct perf_event *bp[])
{
int i;
int dr7 = 0;
struct arch_hw_breakpoint *info;
for (i = 0; i < HBP_NUM; i++) {
if (bp[i] && !bp[i]->attr.disabled) {
info = counter_arch_bp(bp[i]);
dr7 |= encode_dr7(i, info->len, info->type);
}
}
return dr7;
}
Commit Message:... | 0 | 25,906 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static EAS_RESULT Parse_data (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_I32 size, S_WSMP_DATA *pWsmp, EAS_SAMPLE *pSample)
{
EAS_RESULT result;
EAS_U8 convBuf[SAMPLE_CONVERT_CHUNK_SIZE];
EAS_I32 count;
EAS_I32 i;
EAS_I8 *p;
/* seek to start of chunk */
if ((result = EAS_HWFileSeek(p... | 0 | 157,518 |
Analyze the following 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 vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid,
struct scatterlist *sgl, unsigned int sgc)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
const struct net_device_ops *ops = real_dev->netdev_ops;
int rc = 0;
if (ops->ndo_fcoe_ddp_target)
rc = ops->ndo_fcoe_ddp_tar... | 0 | 24,268 |
Analyze the following 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 kioctx *lookup_ioctx(unsigned long ctx_id)
{
struct mm_struct *mm = current->mm;
struct kioctx *ctx, *ret = NULL;
struct hlist_node *n;
rcu_read_lock();
hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) {
/*
* RCU protects us against accessing freed memory but
* we have to be ca... | 0 | 21,693 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ecall(mrb_state *mrb)
{
struct RProc *p;
struct mrb_context *c = mrb->c;
mrb_callinfo *ci = c->ci;
struct RObject *exc;
struct REnv *env;
ptrdiff_t cioff;
int ai = mrb_gc_arena_save(mrb);
int i = --c->eidx;
int nregs;
if (i<0) return;
if (ci - c->cibase > MRB_ECALL_DEPTH_MAX) {
mrb_exc_... | 0 | 83,172 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void AccessibilityUIElement::getChildren(Vector<RefPtr<AccessibilityUIElement> >& children)
{
if (!m_element || !ATK_IS_OBJECT(m_element))
return;
int count = childrenCount();
for (int i = 0; i < count; i++) {
AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i... | 0 | 106,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: static void kvm_iommu_put_pages(struct kvm *kvm,
gfn_t base_gfn, unsigned long npages)
{
struct iommu_domain *domain;
gfn_t end_gfn, gfn;
pfn_t pfn;
u64 phys;
domain = kvm->arch.iommu_domain;
end_gfn = base_gfn + npages;
gfn = base_gfn;
/* check if iommu exists and in use */
if (!domain)
... | 0 | 37,948 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dns_resolver_match(const struct key *key,
const struct key_match_data *match_data)
{
int slen, dlen, ret = 0;
const char *src = key->description, *dsp = match_data->raw_data;
kenter("%s,%s", src, dsp);
if (!src || !dsp)
goto no_match;
if (strcasecmp(src, dsp) == 0)
goto matched;
slen = strle... | 1 | 168,438 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PassRefPtr<HTMLSelectElement> HTMLSelectElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form, bool createdByParser)
{
ASSERT(tagName.matches(selectTag));
return adoptRef(new HTMLSelectElement(tagName, document, form, createdByParser));
}
Commit Message: SelectElement sh... | 0 | 103,056 |
Analyze the following 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 SyncManager::RequestClearServerData() {
DCHECK(thread_checker_.CalledOnValidThread());
if (data_->scheduler())
data_->scheduler()->ScheduleClearUserData();
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TEST=
Review URL: https://chromiumcoderevie... | 0 | 105,159 |
Analyze the following 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 sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
{
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
int err;
/* Check outgoing MTU */
if (len > conn->mtu)
return -EINVAL;
BT_DBG("sk %p len %d", sk, len);
skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAI... | 0 | 57,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: static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn)
{
int err;
if ((BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) ||
insn->imm != 0) {
verbose(env, "BPF_XADD uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg... | 0 | 76,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: static void coin_cleanup(void* c)
{
uivector_cleanup(&((Coin*)c)->symbols);
}
Commit Message: Fixed #5645: realloc return handling
CWE ID: CWE-772 | 0 | 87,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: struct task_struct *find_lock_task_mm(struct task_struct *p)
{
struct task_struct *t = p;
do {
task_lock(t);
if (likely(t->mm))
return t;
task_unlock(t);
} while_each_thread(p, t);
return NULL;
}
Commit Message: oom: fix integer overflow of points in oom_badness
commit ff05b6f7ae762b6eb464183eec9... | 0 | 24,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 void snd_usbmidi_standard_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
for (i = 0; i + 3 < buffer_length; i += 4)
if (buffer[i] != 0) {
int cable = buffer[i] >> 4;
int length = snd_usbmidi_cin_length[buffer[i] & 0x0f];
snd_usbmidi_input_da... | 0 | 54,806 |
Analyze the following 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 writeNumberObject(v8::Handle<v8::Value> value)
{
v8::Handle<v8::NumberObject> numberObject = value.As<v8::NumberObject>();
m_writer.writeNumberObject(numberObject->ValueOf());
}
Commit Message: Replace further questionable HashMap::add usages in bindings
BUG=390928
R=dcarney@chr... | 0 | 120,571 |
Analyze the following 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 k90_init_backlight(struct hid_device *dev)
{
int ret;
struct corsair_drvdata *drvdata = hid_get_drvdata(dev);
size_t name_sz;
char *name;
drvdata->backlight = kzalloc(sizeof(struct k90_led), GFP_KERNEL);
if (!drvdata->backlight) {
ret = -ENOMEM;
goto fail_backlight_alloc;
}
name_sz =
... | 0 | 68,799 |
Analyze the following 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 asf_get_packet(AVFormatContext *s, AVIOContext *pb)
{
ASFContext *asf = s->priv_data;
uint32_t packet_length, padsize;
int rsize = 8;
int c, d, e, off;
if (asf->uses_std_ecc > 0) {
off = 32768;
if (asf->no_resync_search)
off = 3;
c = d = e = -1;... | 0 | 61,346 |
Analyze the following 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 parse_audio_unit(struct mixer_build *state, int unitid)
{
unsigned char *p1;
if (test_and_set_bit(unitid, state->unitbitmap))
return 0; /* the unit already visited */
p1 = find_audio_control_unit(state, unitid);
if (!p1) {
usb_audio_err(state->chip, "unit %d not found!\n", unitid);
return -... | 0 | 59,991 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: txid_snapshot_xmax(PG_FUNCTION_ARGS)
{
TxidSnapshot *snap = (TxidSnapshot *) PG_GETARG_VARLENA_P(0);
PG_RETURN_INT64(snap->xmax);
}
Commit Message: Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrappe... | 0 | 39,062 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: R_API ut64 r_anal_bb_opaddr_at(RAnalBlock *bb, ut64 off) {
ut16 delta, delta_off, last_delta;
int i;
if (!r_anal_bb_is_in_offset (bb, off)) {
return UT64_MAX;
}
last_delta = 0;
delta_off = off - bb->addr;
for (i = 0; i < bb->ninstr; i++) {
delta = r_anal_bb_offset_inst (bb, i);
if (delta > delta_off... | 0 | 82,036 |
Analyze the following 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 RenderWidgetHostViewGuest::RenderViewGone(base::TerminationStatus status,
int error_code) {
Destroy();
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI ... | 0 | 115,043 |
Analyze the following 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 AXTableCell::isTableCell() const {
AXObject* parent = parentObjectUnignored();
if (!parent || !parent->isTableRow())
return false;
return true;
}
Commit Message: Switch to equalIgnoringASCIICase throughout modules/accessibility
BUG=627682
Review-Url: https://codereview.chromium.org/2793913007
C... | 0 | 127,402 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int jpc_bitstream_close(jpc_bitstream_t *bitstream)
{
int ret = 0;
/* Align to the next byte boundary while considering the effects of
bit stuffing. */
if (jpc_bitstream_align(bitstream)) {
ret = -1;
}
/* If necessary, close the underlying (character) stream. */
if (!(bitstream->flags_ & JPC_BITSTREA... | 0 | 72,990 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderView::CheckPreferredSize() {
if (!send_preferred_size_changes_ || !webview())
return;
gfx::Size size(webview()->mainFrame()->contentsPreferredWidth(),
webview()->mainFrame()->documentElementScrollHeight());
double zoom_factor = WebView::zoomLevelToZoomFactor(webview()->zoom... | 0 | 98,898 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Node* DragController::DraggableNode(const LocalFrame* src,
Node* start_node,
const IntPoint& drag_origin,
SelectionDragPolicy selection_drag_policy,
DragSourceAction& dra... | 0 | 152,274 |
Analyze the following 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 sched_setscheduler(struct task_struct *p, int policy,
struct sched_param *param)
{
return __sched_setscheduler(p, policy, param, true);
}
Commit Message: Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched().... | 0 | 22,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: int sm_restore_priority(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) {
fm_mgr_config_errno_t res;
fm_msg_ret_code_t ret_code;
if((res = fm_mgr_simple_query(hdl, FM_ACT_GET, FM_DT_SM_RESTORE_PRIORITY, mgr, 0, NULL, &ret_code)) != FM_CONF_OK)
{
fprintf(stderr, "sm_restore_priority: ... | 0 | 96,218 |
Analyze the following 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 DialogNotification::HasArrow() const {
return type_ == DialogNotification::WALLET_ERROR ||
type_ == DialogNotification::WALLET_USAGE_CONFIRMATION;
}
Commit Message: Clear out some minor TODOs.
BUG=none
Review URL: https://codereview.chromium.org/1047063002
Cr-Commit-Position: refs/heads/master... | 0 | 109,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 closedCallback(WebKitWebInspector*, InspectorTest* test)
{
return test->closed();
}
Commit Message: [GTK] Inspector should set a default attached height before being attached
https://bugs.webkit.org/show_bug.cgi?id=90767
Reviewed by Xan Lopez.
We are currently using the minimum ... | 0 | 108,914 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.