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: ScriptValue Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, ExceptionState& es)
{
return registerElement(state, name, Dictionary(), es);
}
Commit Message: Refactoring: Move m_mayDisplaySeamlesslyWithParent down to Document
The member is used only in Document, thus no reason ... | 0 | 102,830 |
Analyze the following 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 perf_event *ptrace_hbp_create(struct task_struct *tsk, int type)
{
struct perf_event_attr attr;
ptrace_breakpoint_init(&attr);
/* Initialise fields to sane defaults. */
attr.bp_addr = 0;
attr.bp_len = HW_BREAKPOINT_LEN_4;
attr.bp_type = type;
attr.disabled = 1;
return register_user_hw_bre... | 0 | 58,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: string16 GetAppListShortcutName() {
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
if (channel == chrome::VersionInfo::CHANNEL_CANARY)
return l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME_CANARY);
return l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME);
}
Commit M... | 0 | 113,627 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GDataRootDirectory::CacheEntry* GDataRootDirectory::GetCacheEntry(
const std::string& resource_id,
const std::string& md5) {
CacheMap::iterator iter = cache_map_.find(resource_id);
if (iter == cache_map_.end()) {
DVLOG(1) << "Can't find " << resource_id << " in cache map";
return NULL;
}
... | 0 | 104,699 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline long decode_twos_comp(ulong c, int prec)
{
long result;
assert(prec >= 2);
jas_eprintf("warning: support for signed data is untested\n");
result = (c & ((1 << (prec - 1)) - 1)) - (c & (1 << (prec - 1)));
return result;
}
Commit Message: The generation of the configuration file jas_config.... | 1 | 168,691 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: connection_edge_process_inbuf(edge_connection_t *conn, int package_partial)
{
tor_assert(conn);
switch (conn->base_.state) {
case AP_CONN_STATE_SOCKS_WAIT:
if (connection_ap_handshake_process_socks(EDGE_TO_ENTRY_CONN(conn)) <0) {
/* already marked */
return -1;
}
return ... | 0 | 69,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: PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
: m_view(new QQuickWebView(contextRef, pageGroupRef))
, m_window(new WrapperWindow(m_view))
, m_windowIsKey(true)
, m_modalEventLoop(0)
{
QQuickWebViewExperimental experimental(m_view);
experimental.se... | 1 | 170,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: int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
{
int rc;
if (txq < 1 || txq > dev->num_tx_queues)
return -EINVAL;
if (dev->reg_state == NETREG_REGISTERED ||
dev->reg_state == NETREG_UNREGISTERING) {
ASSERT_RTNL();
rc = netdev_queue_update_kobjects(dev, dev->real_num_tx... | 0 | 48,917 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_METHOD(Phar, copy)
{
char *oldfile, *newfile, *error;
const char *pcr_error;
int oldfile_len, newfile_len;
phar_entry_info *oldentry, newentry = {0}, *temp;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE) {
... | 0 | 4,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: SWFShape_getLines(SWFShape shape, SWFLineStyle** lines, int* nLines)
{
*lines = shape->lines;
*nLines = shape->nLines;
}
Commit Message: SWFShape_setLeftFillStyle: prevent fill overflow
CWE ID: CWE-119 | 0 | 89,513 |
Analyze the following 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 openpic_cpu_write_internal(void *opaque, hwaddr addr,
uint32_t val, int idx)
{
OpenPICState *opp = opaque;
IRQSource *src;
IRQDest *dst;
int s_IRQ, n_IRQ;
DPRINTF("%s: cpu %d addr %#" HWADDR_PRIx " <= 0x%08x\n", __func__, idx,
add... | 0 | 15,680 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void __exit ifb_cleanup_module(void)
{
rtnl_link_unregister(&ifb_link_ops);
}
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 drivers... | 0 | 23,784 |
Analyze the following 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 ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_tx_control *txctl)
{
struct ieee80211_hdr *hdr;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_sta *sta = txctl->sta;
struct ieee80211_vif *vif = info->control.vif;
struct ath_softc *sc = hw->priv;
struct ... | 0 | 38,708 |
Analyze the following 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 shmem_delete_from_page_cache(struct page *page, void *radswap)
{
struct address_space *mapping = page->mapping;
int error;
spin_lock_irq(&mapping->tree_lock);
error = shmem_radix_tree_replace(mapping, page->index, page, radswap);
page->mapping = NULL;
mapping->nrpages--;
__dec_zone_page_state(... | 0 | 33,488 |
Analyze the following 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 f_parser (lua_State *L, void *ud) {
int i;
Proto *tf;
Closure *cl;
struct SParser *p = cast(struct SParser *, ud);
int c = luaZ_lookahead(p->z);
luaC_checkGC(L);
tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z,
... | 1 | 166,613 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void nicklist_destroy(CHANNEL_REC *channel, NICK_REC *nick)
{
signal_emit("nicklist remove", 2, channel, nick);
if (channel->ownnick == nick)
channel->ownnick = NULL;
/*MODULE_DATA_DEINIT(nick);*/
g_free(nick->nick);
g_free_not_null(nick->realname);
g_free_not_null(nick->host... | 0 | 63,682 |
Analyze the following 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 MediaPlayerService::Client::getCurrentPosition(int *msec)
{
ALOGV("getCurrentPosition");
sp<MediaPlayerBase> p = getPlayer();
if (p == 0) return UNKNOWN_ERROR;
status_t ret = p->getCurrentPosition(msec);
if (ret == NO_ERROR) {
ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec);
} e... | 0 | 157,986 |
Analyze the following 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 RenderProcessHostWatcher::RenderProcessHostDestroyed(
RenderProcessHost* host) {
render_process_host_ = nullptr;
if (type_ == WATCH_FOR_HOST_DESTRUCTION)
message_loop_runner_->Quit();
}
Commit Message: Apply ExtensionNavigationThrottle filesystem/blob checks to all frames.
BUG=836858
Change-Id... | 0 | 156,132 |
Analyze the following 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 qeth_check_outbound_queue(struct qeth_qdio_out_q *queue)
{
int index;
int flush_cnt = 0;
int q_was_packing = 0;
/*
* check if weed have to switch to non-packing mode or if
* we have to get a pci flag out on the queue
*/
if ((atomic_read(&queue->used_buffers) <= QETH_LOW_WATERMARK_PACK) ||
... | 0 | 28,485 |
Analyze the following 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 GetValidScheme(const std::string &text,
url_parse::Component* scheme_component,
std::string* canon_scheme) {
if (!url_parse::ExtractScheme(text.data(), static_cast<int>(text.length()),
scheme_component))
return... | 0 | 99,442 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: edge_reason_is_retriable(int reason)
{
return reason == END_STREAM_REASON_HIBERNATING ||
reason == END_STREAM_REASON_RESOURCELIMIT ||
reason == END_STREAM_REASON_EXITPOLICY ||
reason == END_STREAM_REASON_RESOLVEFAILED ||
reason == END_STREAM_REASON_MISC ||
reason == ... | 0 | 69,858 |
Analyze the following 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_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data)
{
if (nfs4_setup_sequence(NFS_SERVER(data->inode),
&data->args.seq_args,
&data->res.seq_res,
task))
return;
rpc_call_start(task);
}
Commit Message: Fix length of buffer copied in __nfs4_get_acl_uncached
_... | 0 | 20,005 |
Analyze the following 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 GLES2DecoderImpl::HandleGetFragDataIndexEXT(
uint32_t immediate_data_size,
const volatile void* cmd_data) {
if (!features().ext_blend_func_extended) {
return error::kUnknownCommand;
}
const volatile gles2::cmds::GetFragDataIndexEXT& c =
*static_cast<const volatile gles2::cmds:... | 0 | 141,538 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int getch() {
struct termios old;
struct termios new;
int rc;
if (tcgetattr(0, &old) == -1) {
return -1;
}
new = old;
new.c_lflag &= ~(ICANON | ECHO);
new.c_cc[VMIN] = 1;
new.c_cc[VTIME] = 0;
if (tcsetattr(0, TCSANOW, &new) == -1) {
return -1;
}
rc = getchar();
(void) tcsetattr(0, TCSANOW, &old);... | 0 | 92,818 |
Analyze the following 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 tls1_get_curvelist(SSL *s, int sess,
const unsigned char **pcurves,
size_t *num_curves)
{
size_t pcurveslen = 0;
if (sess) {
*pcurves = s->session->tlsext_ellipticcurvelist;
pcurveslen = s->session->tlsext_ellipticcurve... | 0 | 6,170 |
Analyze the following 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 copy_gigantic_page(struct page *dst, struct page *src)
{
int i;
struct hstate *h = page_hstate(src);
struct page *dst_base = dst;
struct page *src_base = src;
for (i = 0; i < pages_per_huge_page(h); ) {
cond_resched();
copy_highpage(dst, src);
i++;
dst = mem_map_next(dst, dst_base, i);
... | 0 | 19,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: map_engine_set_subject(person_t* person)
{
s_camera_person = person;
}
Commit Message: Fix integer overflow in layer_resize in map_engine.c (#268)
* Fix integer overflow in layer_resize in map_engine.c
There's a buffer overflow bug in the function layer_resize. It allocates
a buffer `tilemap` with size `x_... | 0 | 75,042 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: XScopedImage::~XScopedImage() {
reset(NULL);
}
Commit Message: Make shared memory segments writable only by their rightful owners.
BUG=143859
TEST=Chrome's UI still works on Linux and Chrome OS
Review URL: https://chromiumcodereview.appspot.com/10854242
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158... | 0 | 119,239 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool RenderLayerCompositor::requiresScrollCornerLayer() const
{
FrameView* view = m_renderView->frameView();
return shouldCompositeOverflowControls(view) && view->isScrollCornerVisible();
}
Commit Message: Disable some more query compositingState asserts.
This gets the tests passing again on Mac. See th... | 0 | 113,852 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gs_lib_ctx_get_non_gc_memory_t()
{
return mem_err_print ? mem_err_print : NULL;
}
Commit Message:
CWE ID: CWE-20 | 0 | 14,016 |
Analyze the following 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::DoGetIntegerv(GLenum pname, GLint* params) {
DCHECK(params);
GLsizei num_written;
if (!GetHelper(pname, params, &num_written)) {
glGetIntegerv(pname, params);
}
}
Commit Message: Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
TBR=apatrick@chromium.o... | 0 | 99,150 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: service_manager::InterfaceProvider* RenderFrameImpl::GetInterfaceProvider() {
return &remote_interfaces_;
}
Commit Message: Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://c... | 0 | 139,662 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: std::string BluetoothAdapterChromeOS::GetName() const {
if (!IsPresent())
return std::string();
BluetoothAdapterClient::Properties* properties =
DBusThreadManager::Get()->GetBluetoothAdapterClient()->
GetProperties(object_path_);
DCHECK(properties);
return properties->alias.value();
... | 0 | 112,515 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virDomainPMWakeup(virDomainPtr dom,
unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(dom, "flags=%x", flags);
virResetLastError();
virCheckDomainReturn(dom, -1);
conn = dom->conn;
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainPMWakeu... | 0 | 93,893 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void DocumentLoader::clearArchiveResources()
{
m_archiveResourceCollection.clear();
m_substituteResourceDeliveryTimer.stop();
}
Commit Message: Unreviewed, rolling out r147402.
http://trac.webkit.org/changeset/147402
https://bugs.webkit.org/show_bug.cgi?id=112903
Source/WebCore:
* dom/Document.cpp:
(W... | 0 | 105,695 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Layer::RemoveLayerAnimationEventObserver(
LayerAnimationEventObserver* animation_observer) {
layer_animation_controller_->RemoveEventObserver(animation_observer);
}
Commit Message: Removed pinch viewport scroll offset distribution
The associated change in Blink makes the pinch viewport a proper
Scrol... | 0 | 111,883 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebGLTexture* WebGLRenderingContextBase::ValidateTexImageBinding(
const char* func_name,
TexImageFunctionID function_id,
GLenum target) {
return ValidateTexture2DBinding(func_name, target);
}
Commit Message: Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before ReadP... | 0 | 133,751 |
Analyze the following 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 copy_shadow_to_vmcs12(struct vcpu_vmx *vmx)
{
int i;
unsigned long field;
u64 field_value;
struct vmcs *shadow_vmcs = vmx->vmcs01.shadow_vmcs;
const unsigned long *fields = shadow_read_write_fields;
const int num_fields = max_shadow_read_write_fields;
preempt_disable();
vmcs_load(shadow_vmcs... | 0 | 48,011 |
Analyze the following 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 FLTIsGMLDefaultProperty(const char* pszName)
{
return (strcmp(pszName, "gml:name") == 0 ||
strcmp(pszName, "gml:description") == 0 ||
strcmp(pszName, "gml:descriptionReference") == 0 ||
strcmp(pszName, "gml:identifier") == 0 ||
strcmp(pszName, "gml:bo... | 0 | 68,999 |
Analyze the following 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::ExitFullscreen() {
if (!IsFullscreen())
return; // Nothing to do.
ProcessFullscreen(false, GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE);
}
Commit Message: Mac: turn popups into new tabs while in fullscreen.
It's platform convention to show popups as new tabs while in
non-HTML5 fullscre... | 0 | 155,157 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ASCIIHexEncoder::ASCIIHexEncoder(Stream *strA):
FilterStream(strA) {
bufPtr = bufEnd = buf;
lineLen = 0;
eof = gFalse;
}
Commit Message:
CWE ID: CWE-119 | 0 | 3,891 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int crc32c_sparc64_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
u32 *crcp = shash_desc_ctx(desc);
crc32c_compute(crcp, (const u64 *) data, len);
return 0;
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "cryp... | 0 | 46,758 |
Analyze the following 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 Element::clientTop()
{
document()->updateLayoutIgnorePendingStylesheets();
if (RenderBox* renderer = renderBox())
return adjustForAbsoluteZoom(roundToInt(renderer->clientTop()), renderer);
return 0;
}
Commit Message: Set Attr.ownerDocument in Element#setAttributeNode()
Attr objects can ... | 0 | 112,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 voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::voidMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
Commit Message: document.location bindings fix
BUG=352374... | 0 | 122,041 |
Analyze the following 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 DatabaseMessageFilter::OnDatabaseDeleteFile(const string16& vfs_file_name,
const bool& sync_dir,
IPC::Message* reply_msg) {
DatabaseDeleteFile(vfs_file_name, sync_dir, reply_msg, kNumDeleteRetries);
}
Commit ... | 0 | 116,900 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mainloop_set_trigger(crm_trigger_t * source)
{
source->trigger = TRUE;
}
Commit Message: High: core: Internal tls api improvements for reuse with future LRMD tls backend.
CWE ID: CWE-399 | 0 | 33,926 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
MagickOffsetType
offset;
MagickSizeType
number_pixels;
register ssize_t
i,
y;
register PixelPacket
*q;
register unsigned char
*c1,
*c2,... | 1 | 168,590 |
Analyze the following 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 ChildProcessSecurityPolicyImpl::GetOriginLock(int child_id) {
base::AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(child_id);
if (state == security_state_.end())
return GURL();
return state->second->origin_lock();
}
Commit Message: Lock down blob/filesystem URL cre... | 0 | 143,726 |
Analyze the following 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 IfaddrsToNetworkInterfaceList(int policy,
const ifaddrs* interfaces,
IPAttributesGetter* ip_attributes_getter,
NetworkInterfaceList* networks) {
for (const ifaddrs* interface = interfaces; interface != ... | 0 | 156,302 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void OverloadedMethodN2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8TestCallbackInterface* test_callback_interface_arg;
if (info[0]->IsObject()) {
test_callback_interface_arg = V8TestCallbackInterface::Create(info[0].As<v8::O... | 0 | 134,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 netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
struct net_device *dev)
{
s16 len;
int i, j;
struct airo_info *priv = dev->ml_priv;
u32 *fids = priv->fids;
if (test_bit(FLAG_MPI, &priv->flags)) {
/* Not implemented yet for MPI350 */
netif_stop_queue(dev);
dev_kfree_skb_any(skb);
re... | 0 | 24,006 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: export_pamenv (void)
{
char **env;
/* This is a copy but don't care to free as we exec later anyways. */
env = pam_getenvlist (pamh);
while (env && *env)
{
if (putenv (*env) != 0)
err (EXIT_FAILURE, NULL);
env++;
}
}
Commit Message: su: properly clear child PID
Reported-by: Tobias... | 0 | 86,497 |
Analyze the following 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 ResourceDispatcherHostImpl::RegisterInterceptor(
const std::string& http_header,
const std::string& starts_with,
const InterceptorCallback& interceptor) {
DCHECK(!http_header.empty());
DCHECK(interceptor);
DCHECK(http_header_interceptor_map_.find(http_header) ==
http_header_interce... | 0 | 152,038 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: BluetoothAdapter::GetPendingAdvertisementsForTesting() const {
return {};
}
Commit Message: bluetooth: Implement getAvailability()
This change implements the getAvailability() method for
navigator.bluetooth as defined in the specification.
Bug: 707640
Change-Id: I9e9b3e7f8ea7f259e975f71cb6d9570e5f04b479
Re... | 0 | 138,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: FileHandlersMimeUtilTest()
: ExtensionsTest(std::make_unique<content::TestBrowserThreadBundle>()) {}
Commit Message: Revert "Don't sniff HTML from documents delivered via the file protocol"
This reverts commit 3519e867dc606437f804561f889d7ed95b95876a.
Reason for revert: crbug.com/786150. Application co... | 0 | 148,390 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xps_parse_glyphs_imp(xps_context_t *ctx, xps_font_t *font, float size,
float originx, float originy, int is_sideways, int bidi_level,
char *indices, char *unicode, int is_charpath, int sim_bold)
{
xps_text_buffer_t buf;
xps_glyph_metrics_t mtx;
float x = originx;
float y = originy;... | 0 | 5,579 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool fc_may_access(struct fuse_context *fc, const char *contrl, const char *cg, const char *file, mode_t mode)
{
struct cgfs_files *k = NULL;
bool ret = false;
if (!file)
file = "tasks";
if (*file == '/')
file++;
k = cgfs_get_key(contrl, cg, file);
if (!k)
return false;
if (is_privileged_o... | 0 | 44,390 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
{
struct sk_buff *fp, *op, *head = fq->q.fragments;
int payload_len;
fq_kill(fq);
WARN_ON(head == NULL);
WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
/* Unfragmented part is taken from the first segment. */
payload_len = ((head->da... | 1 | 165,591 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
struct nfs_renameres *res)
{
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);
if (status)
goto out;
status = ... | 0 | 23,439 |
Analyze the following 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 WebRTCAudioDeviceTest::OnGetHardwareSampleRate(double* sample_rate) {
EXPECT_TRUE(audio_util_callback_);
*sample_rate = audio_util_callback_ ?
audio_util_callback_->GetAudioHardwareSampleRate() : 0.0;
}
Commit Message: Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboa... | 0 | 108,542 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void free_func_state(struct bpf_func_state *state)
{
if (!state)
return;
kfree(state->stack);
kfree(state);
}
Commit Message: bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emula... | 0 | 76,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: static int local_unlinkat_common(FsContext *ctx, int dirfd, const char *name,
int flags)
{
int ret = -1;
if (ctx->export_flags & V9FS_SM_MAPPED_FILE) {
int map_dirfd;
if (flags == AT_REMOVEDIR) {
int fd;
fd = openat_dir(dirfd, nam... | 0 | 17,883 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dissect_rpcap_open_request (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
gint len;
len = tvb_captured_length_remaining (tvb, offset);
proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, ENC_ASCII|ENC_NA);
}
Commit Message: The ... | 0 | 51,756 |
Analyze the following 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 OfflinePageModelImpl::OnPagesFoundWithSameURL(
const OfflinePageItem& offline_page,
size_t pages_allowed,
const MultipleOfflinePageItemResult& items) {
std::vector<OfflinePageItem> pages_to_delete;
for (const auto& item : items) {
if (item.offline_id != offline_page.offline_id &&
... | 0 | 155,912 |
Analyze the following 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 XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
{
if (!m_upload)
return;
if (m_uploadEventsAllowed)
m_upload->dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().progressEvent, true, bytesSent, totalBytesToBeSent));
if ... | 0 | 110,913 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_Err hvcc_dump(GF_Box *a, FILE * trace)
{
u32 i, count;
const char *name = (a->type==GF_ISOM_BOX_TYPE_HVCC) ? "HEVC" : "L-HEVC";
char boxname[256];
GF_HEVCConfigurationBox *p = (GF_HEVCConfigurationBox *) a;
sprintf(boxname, "%sConfigurationBox", name);
gf_isom_box_dump_start(a, boxname, trace);
fprintf... | 0 | 80,761 |
Analyze the following 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 PartiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
scheduler::CooperativeSchedulingManager::Instance()->Safepoint();
bool is_arity_error = false;
switch (std::min(test_object_v8_internal::PartiallyRuntimeEnabledOverloadedVoidMethodMethodMaxArg(... | 0 | 134,999 |
Analyze the following 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 V9fsFidState *clunk_fid(V9fsState *s, int32_t fid)
{
V9fsFidState **fidpp, *fidp;
for (fidpp = &s->fid_list; *fidpp; fidpp = &(*fidpp)->next) {
if ((*fidpp)->fid == fid) {
break;
}
}
if (*fidpp == NULL) {
return NULL;
}
fidp = *fidpp;
*fidpp ... | 0 | 1,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: PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value,
long limit_val, long flags TSRMLS_DC)
{
pcre_extra *extra = NULL; /* Holds results of studying */
pcre *re_bump = NULL; /* Regex instance for empty matches */
pcre_extra *extra_bump = NULL; /* Almos... | 0 | 61 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: NTSTATUS TCDeviceIoControl (PWSTR deviceName, ULONG IoControlCode, void *InputBuffer, ULONG InputBufferSize, void *OutputBuffer, ULONG OutputBufferSize)
{
IO_STATUS_BLOCK ioStatusBlock;
NTSTATUS ntStatus;
PIRP irp;
PFILE_OBJECT fileObject;
PDEVICE_OBJECT deviceObject;
KEVENT event;
UNICODE_STRING name;
R... | 0 | 87,206 |
Analyze the following 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 PluginModule::InitAsProxiedNaCl(
scoped_ptr<PluginDelegate::OutOfProcessProxy> out_of_process_proxy,
PP_Instance instance) {
nacl_ipc_proxy_ = true;
InitAsProxied(out_of_process_proxy.release());
out_of_process_proxy_->AddInstance(instance);
PluginInstance* plugin_instance = host_globals->... | 1 | 170,745 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
Image *image)
{
const char
*value;
int
webp_status;
MagickBooleanType
status;
MemoryInfo
*pixel_info;
register uint32_t
*magick_restrict q;
ssize_t
y;
WebPConfig
configure;
WebPPicture
pic... | 0 | 67,996 |
Analyze the following 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 acpi_os_printf(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
acpi_os_vprintf(fmt, args);
va_end(args);
}
Commit Message: acpi: Disable ACPI table override if securelevel is set
From the kernel documentation (initrd_table_override.txt):
If the ACPI_INITRD_TABLE_OVERRIDE compile option is... | 0 | 53,859 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: u32 svc_max_payload(const struct svc_rqst *rqstp)
{
u32 max = rqstp->rq_xprt->xpt_class->xcl_max_payload;
if (rqstp->rq_server->sv_max_payload < max)
max = rqstp->rq_server->sv_max_payload;
return max;
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bru... | 0 | 65,935 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RECORD_LAYER_clear(RECORD_LAYER *rl)
{
rl->rstate = SSL_ST_READ_HEADER;
/*
* Do I need to clear read_ahead? As far as I can tell read_ahead did not
* previously get reset by SSL_clear...so I'll keep it that way..but is
* that right?
*/
rl->packet = NULL;
rl->packet_lengt... | 0 | 69,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 DownloadManagerImpl::InProgressCount() const {
int count = 0;
for (const auto& it : downloads_) {
if (it.second->GetState() == DownloadItem::IN_PROGRESS)
++count;
}
return count;
}
Commit Message: Downloads : Fixed an issue of opening incorrect download file
When one download overwrites an... | 0 | 146,442 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_Box *clap_New()
{
ISOM_DECL_BOX_ALLOC(GF_CleanAppertureBox, GF_ISOM_BOX_TYPE_CLAP);
return (GF_Box *)tmp;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,010 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar * val)
{
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL,
XML_FROM... | 0 | 163,410 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t Parcel::writeInt64(int64_t val)
{
return writeAligned(val);
}
Commit Message: Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.... | 0 | 157,343 |
Analyze the following 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 alloc_high_class_bfreg(struct mlx5_ib_dev *dev,
struct mlx5_bfreg_info *bfregi)
{
int i;
for (i = first_hi_bfreg(dev, bfregi); i < max_bfregs(dev, bfregi); i++) {
if (!bfregi->count[i]) {
bfregi->count[i]++;
return i;
}
}
return -ENOMEM;
}
Commit Message: IB/mlx5: Fix leaking sta... | 0 | 92,078 |
Analyze the following 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 BlobURLRequestJob::DidCountSize(int error) {
DCHECK(!error_);
if (error != net::OK) {
NotifyFailure(error);
return;
}
if (!byte_range_.ComputeBounds(total_size_)) {
NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE);
return;
}
remaining_bytes_ = byte_range_.last_byte_positio... | 0 | 115,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: bool HTMLMediaElement::havePotentialSourceChild() {
HTMLSourceElement* currentSourceNode = m_currentSourceNode;
Node* nextNode = m_nextChildNodeToConsider;
KURL nextURL = selectNextSourceChild(0, DoNothing);
m_currentSourceNode = currentSourceNode;
m_nextChildNodeToConsider = nextNode;
return nextU... | 0 | 128,813 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: arcStrokeCircle(const pointObj *p1, const pointObj *p2, const pointObj *p3,
double segment_angle, int include_first, pointArrayObj *pa)
{
pointObj center; /* Center of our circular arc */
double radius; /* Radius of our circular arc */
double sweep_angle_r; /* Total angular size of our circu... | 0 | 40,801 |
Analyze the following 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 mtrr_lookup_var_next(struct mtrr_iter *iter)
{
__mtrr_lookup_var_next(iter);
}
Commit Message: KVM: MTRR: remove MSR 0x2f8
MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support
was introduced by 9ba075a664df ("KVM: MTRR support").
0x2f8 became harmful when 910a6aae4e2e ("KVM: MT... | 0 | 53,773 |
Analyze the following 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 arcmsr_request_device_map(unsigned long pacb)
{
struct AdapterControlBlock *acb = (struct AdapterControlBlock *)pacb;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
arcmsr_hbaA_request_device_map(acb);
}
break;
case ACB_ADAPTER_TYPE_B: {
arcmsr_hbaB_request_device_map(acb);
... | 0 | 49,828 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GDataDirectory::AddEntry(GDataEntry* entry) {
entry->SetFileNameFromTitle();
int max_modifier = 1;
FilePath full_file_name(entry->file_name());
const std::string extension = full_file_name.Extension();
const std::string file_name = full_file_name.RemoveExtension().value();
while (FindChild(full_... | 0 | 104,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 int samldb_first_step(struct samldb_ctx *ac)
{
if (ac->steps == NULL) {
return ldb_operr(ldb_module_get_ctx(ac->module));
}
ac->curstep = ac->steps;
return ac->curstep->fn(ac);
}
Commit Message:
CWE ID: CWE-264 | 0 | 12 |
Analyze the following 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 BytesPerElement(int type) {
switch (type) {
case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
return 8;
case GL_FLOAT:
case GL_UNSIGNED_INT_24_8_OES:
case GL_UNSIGNED_INT:
case GL_INT:
case GL_UNSIGNED_INT_2_10_10_10_REV:
case GL_UNSIGNED_INT_10F_11F_11F_REV:
case GL_UNSIGNED_INT... | 0 | 153,334 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: brcmf_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_gtk_rekey_data *gtk)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_gtk_keyinfo_le gtk_le;
int ret;
brcmf_dbg(TRACE, "Enter, bssidx=%d\n", ifp->bsscfgidx);
memcpy(gtk_le.kck, gtk->kck, sizeof(gtk_... | 0 | 49,038 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: _PUBLIC_ ssize_t push_codepoint(char *str, codepoint_t c)
{
return push_codepoint_handle(get_iconv_handle(), str, c);
}
Commit Message:
CWE ID: CWE-200 | 0 | 2,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: void RenderWidgetHostViewAura::ProcessGestureEvent(
const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency) {
host_->ForwardGestureEventWithLatencyInfo(event, latency);
}
Commit Message: Allocate a FrameSinkId for RenderWidgetHostViewAura in mus+ash
RenderWidgetHostViewChildFrame expects ... | 0 | 132,288 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Compute_Point_Displacement( EXEC_OP_ FT_F26Dot6* x,
FT_F26Dot6* y,
TT_GlyphZone zone,
FT_UShort* refp )
{
TT_GlyphZoneRec zp;
FT_UShort p;
FT_F26Dot6 d;
... | 0 | 10,072 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: archive_write_set_bytes_in_last_block(struct archive *_a, int bytes)
{
struct archive_write *a = (struct archive_write *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
ARCHIVE_STATE_ANY, "archive_write_set_bytes_in_last_block");
a->bytes_in_last_block = bytes;
return (ARCHIVE_OK);
}
Commit Me... | 0 | 34,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: store_read_reset(png_store *ps)
{
# ifdef PNG_READ_SUPPORTED
if (ps->pread != NULL)
{
anon_context(ps);
Try
png_destroy_read_struct(&ps->pread, &ps->piread, NULL);
Catch_anonymous
{
/* error already output: continue */
}
ps->pread = NULL;
ps->piread = NULL;
}
# ... | 0 | 160,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 const InputTypeFactoryMap* FactoryMap() {
static const InputTypeFactoryMap* factory_map =
CreateInputTypeFactoryMap().release();
return factory_map;
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text in... | 0 | 126,193 |
Analyze the following 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::DoFrontFace(GLenum mode) {
api()->glFrontFaceFn(mode);
return error::kNoError;
}
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: ... | 0 | 141,969 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: android::SoftOMXComponent *createSoftOMXComponent(
const char *name, const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData, OMX_COMPONENTTYPE **component) {
return new android::SoftAVCEncoder(name, callbacks, appData, component);
}
Commit Message: DO NOT MERGE Verify OMX buffer sizes prior to access
Bug:... | 0 | 163,943 |
Analyze the following 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 SaveCardBubbleControllerImpl::OnLearnMoreClicked() {
OpenUrl(GURL(kHelpURL));
AutofillMetrics::LogSaveCardPromptMetric(
AutofillMetrics::SAVE_CARD_PROMPT_DISMISS_CLICK_LEARN_MORE, is_uploading_,
is_reshow_,
pref_service_->GetInteger(
prefs::kAutofillAcceptSaveCreditCardPromptS... | 0 | 137,008 |
Analyze the following 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 expand_inode_data(struct inode *inode, loff_t offset,
loff_t len, int mode)
{
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
pgoff_t index, pg_start, pg_end;
loff_t new_size = i_size_read(inode);
loff_t off_start, off_end;
int ret = 0;
ret = inode_newsize_ok(inode, (len + offset));
if (r... | 0 | 46,307 |
Analyze the following 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 RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
channel_connected_ = true;
if (IsReady()) {
DCHECK(!sent_render_process_ready_);
sent_render_process_ready_ = true;
for (auto& observer : observers_)
observer.RenderProcessReady(this);
}
#if defined(IPC_MESSAGE_LOG_ENABLED... | 0 | 128,284 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.