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: GURL Extension::GetFullLaunchURL() const {
if (!launch_local_path().empty())
return url().Resolve(launch_local_path());
else
return GURL(launch_web_url());
}
Commit Message: Extend TTS extension API to support richer events returned from the engine
to the client. Previously we just had a completed ev... | 0 | 99,731 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SyncError ExtensionService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const SyncChangeList& change_list) {
for (SyncChangeList::const_iterator i = change_list.begin();
i != change_list.end();
++i) {
ExtensionSyncData extension_sync_data = ExtensionSyncData(*i);
... | 0 | 98,634 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::CreateResourceHandler(
net::URLRequest* request,
const ResourceHostMsg_Request& request_data,
IPC::Message* sync_result,
int route_id,
int process_type,
int child_id,
ResourceContext* resource_context) {
tracked_objects::ScopedT... | 0 | 132,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: static int pnm_getuintstr(jas_stream_t *in, uint_fast32_t *val)
{
uint_fast32_t v;
int c;
/* Discard any leading whitespace. */
do {
if ((c = pnm_getc(in)) == EOF) {
return -1;
}
} while (isspace(c));
/* Parse the number. */
v = 0;
while (isdigit(c)) {
v = 10 * v + c - '0';
if ((c = pnm_getc(... | 0 | 72,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: static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock *rs)
{
struct rds_header *hdr = &inc->i_hdr;
unsigned int pos = 0, type, len;
union {
struct rds_ext_header_version version;
struct rds_ext_header_rdma rdma;
struct rds_ext_header_rdma_dest rdma_dest;
} buffer;
while (1) {... | 0 | 19,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: static int chainiv_init_common(struct crypto_tfm *tfm)
{
tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request);
return skcipher_geniv_init(tfm);
}
Commit Message: crypto: include crypto- module prefix in template
This adds the module loading prefix "crypto-" to the template lookup
as well.
For exa... | 0 | 45,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: void InputMethodBase::SetFocusedTextInputClient(TextInputClient* client) {
TextInputClient* old = text_input_client_;
OnWillChangeFocusedClient(old, client);
text_input_client_ = client; // NULL allowed.
OnDidChangeFocusedClient(old, client);
}
Commit Message: cleanup: Use IsTextInputTypeNone() in OnInp... | 0 | 109,179 |
Analyze the following 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 red_peer_receive(RedsStream *stream, uint8_t *buf, uint32_t size)
{
uint8_t *pos = buf;
while (size) {
int now;
if (stream->shutdown) {
return -1;
}
now = reds_stream_read(stream, pos, size);
if (now <= 0) {
if (now == 0) {
... | 0 | 2,199 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_FUNCTION(mb_ereg_search_regs)
{
_php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2);
}
Commit Message: Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
CWE ID: CWE-415 | 0 | 51,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: scoped_ptr<base::MessagePump> CreateMessagePumpForUI() {
return scoped_ptr<base::MessagePump>(new content::NestedMessagePumpAndroid());
}
Commit Message: Content Shell: Move shell_layout_tests_android into layout_tests/.
BUG=420994
Review URL: https://codereview.chromium.org/661743002
Cr-Commit-Position: re... | 0 | 110,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: DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command and display output")
{
char *cmd;
CurrentKeyData = NULL; /* not allowed in w3m-control: */
cmd = searchKeyData();
if (cmd == NULL || *cmd == '\0') {
cmd = inputLineHist("(exec shell)!", "", IN_COMMAND, ShellHist);
}
if (cmd != NULL)
... | 0 | 84,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: void RenderFrameImpl::CreateFrame(
int routing_id,
service_manager::mojom::InterfaceProviderPtr interface_provider,
int proxy_routing_id,
int opener_routing_id,
int parent_routing_id,
int previous_sibling_routing_id,
const base::UnguessableToken& devtools_frame_token,
const FrameRe... | 0 | 152,848 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: vrrp_garp_refresh_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
unsigned refresh;
if (!read_unsigned_strvec(strvec, 1, &refresh, 0, UINT_MAX, true)) {
report_config_error(CONFIG_GENERAL_ERROR, "(%s): Invalid garp_master_refresh '%s' - ignoring", vrrp->iname, FMT_STR_VSLOT(strve... | 0 | 75,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: TranslateInfoBarDelegate::TranslateInfoBarDelegate(
content::WebContents* web_contents,
translate::TranslateStep step,
TranslateInfoBarDelegate* old_delegate,
const std::string& original_language,
const std::string& target_language,
TranslateErrors::Type error_type,
PrefService* prefs,... | 0 | 111,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: static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
{
struct page_frag_cache *nc;
unsigned long flags;
void *data;
local_irq_save(flags);
nc = this_cpu_ptr(&netdev_alloc_cache);
data = page_frag_alloc(nc, fragsz, gfp_mask);
local_irq_restore(flags);
return data;
}
Commit Message: tcp: ... | 0 | 67,667 |
Analyze the following 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 PageHuge(struct page *page)
{
compound_page_dtor *dtor;
if (!PageCompound(page))
return 0;
page = compound_head(page);
dtor = get_compound_page_dtor(page);
return dtor == free_huge_page;
}
Commit Message: hugetlb: fix resv_map leak in error path
When called for anonymous (non-shared) mappings, hug... | 0 | 19,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: void GranularityStrategyTest::SetupTextSpan(String str1,
String str2,
String str3,
size_t sel_begin,
size_t sel_end) {
Text* text1 = Get... | 0 | 124,846 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void SetManualFallbacksForFillingStandalone(bool enabled) {
if (enabled) {
scoped_feature_list_.InitAndEnableFeature(
password_manager::features::kEnableManualFallbacksFillingStandalone);
} else {
scoped_feature_list_.InitAndDisableFeature(
password_manager::features::kEn... | 0 | 124,624 |
Analyze the following 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 __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
return DoDestroyDrawable(cl, req->glxwindow, GLX_DRAWABLE_WINDOW);
}
Commit Message:
CWE ID: CWE-20 | 0 | 14,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 void dispatchChildInsertionEvents(Node* child)
{
if (child->isInShadowTree())
return;
ASSERT(!eventDispatchForbidden());
RefPtr<Node> c = child;
RefPtr<Document> document = child->document();
if (c->parentNode() && document->hasListenerType(Document::DOMNODEINSERTED_LISTENER)... | 0 | 98,689 |
Analyze the following 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 proxy_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
{
zval **login, **password;
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_login", sizeof("_proxy_login"), (void **)&login) == SUCCESS) {
unsigned char* buf;
int len;
sm... | 1 | 165,306 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool jsvIsString(const JsVar *v) { return v && (v->flags&JSV_VARTYPEMASK)>=_JSV_STRING_START && (v->flags&JSV_VARTYPEMASK)<=_JSV_STRING_END; } ///< String, or a NAME too
Commit Message: fix jsvGetString regression
CWE ID: CWE-119 | 0 | 82,489 |
Analyze the following 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 xfer_delete(struct xfer_header *xfer)
{
mbentry_t *newentry = NULL;
struct xfer_item *item;
int r;
syslog(LOG_INFO, "XFER: deleting mailboxes on source");
/* 7) local delete of mailbox
* & remove local "remote" mailboxlist entry */
for (item = xfer->items; item; item = it... | 0 | 95,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: void RenderWidgetHostViewGtk::SetSize(const gfx::Size& size) {
int width = std::min(size.width(), kMaxWindowWidth);
int height = std::min(size.height(), kMaxWindowHeight);
if (IsPopup()) {
gtk_widget_set_size_request(view_.get(), width, height);
}
if (requested_size_.width() != width ||
reque... | 0 | 114,995 |
Analyze the following 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 FindFormInputElement(
const std::vector<blink::WebFormControlElement>& control_elements,
const FormFieldData& field,
bool ambiguous_or_empty_names,
FormInputElementMap* result) {
bool found_input = false;
bool is_password_field = IsPasswordField(field);
bool does_password_field_has_ambi... | 0 | 156,964 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: __xml_acl_free(void *data)
{
if(data) {
xml_acl_t *acl = data;
free(acl->xpath);
free(acl);
}
}
Commit Message: Fix: acl: Do not delay evaluation of added nodes in some situations
It is not appropriate when the node has no children as it is not a
placeholder
CWE ID: CWE-264 | 0 | 43,983 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC)
{
zval_ptr_dtor(&object->object);
zval_ptr_dtor(&object->property);
efree(object);
}
Commit Message: Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
CWE ID: CWE-119 | 0 | 49,973 |
Analyze the following 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 vp8_decoder_create_threads(VP8D_COMP *pbi)
{
int core_count = 0;
unsigned int ithread;
pbi->b_multithreaded_rd = 0;
pbi->allocated_decoding_thread_count = 0;
/* limit decoding threads to the max number of token partitions */
core_count = (pbi->max_threads > 8) ? 8 : pbi->max_threads;
/* li... | 0 | 162,668 |
Analyze the following 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 STBV_CDECL point_compare(const void *p, const void *q)
{
stbv__floor_ordering *a = (stbv__floor_ordering *) p;
stbv__floor_ordering *b = (stbv__floor_ordering *) q;
return a->x < b->x ? -1 : a->x > b->x;
}
Commit Message: fix unchecked length in stb_vorbis that could crash on corrupt/invalid ... | 0 | 75,287 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cancel_loading_attributes (NautilusDirectory *directory,
NautilusFileAttributes file_attributes)
{
Request request;
request = nautilus_directory_set_up_request (file_attributes);
if (REQUEST_WANTS_TYPE (request, REQUEST_DIRECTORY_COUNT))
{
directory_count... | 0 | 60,863 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int _server_handle_z(libgdbr_t *g, int (*cmd_cb) (void*, const char*, char*, size_t), void *core_ptr) {
if (send_ack (g) < 0) {
return -1;
}
char set; // Z = set, z = remove
int type;
ut64 addr;
char cmd[64];
sscanf (g->data, "%c%d,%"PFMT64x, &set, &type, &addr);
if (type != 0) {
return send_ms... | 0 | 64,152 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
{
struct session_state *state = ssh->state;
u_int32_t out_blocks;
/* XXX client can't cope with rekeying pre-auth */
if (!state->after_authentication)
return 0;
/* Haven't keyed yet or KEX in progress. */
if (ssh->kex == NULL || ssh_pa... | 0 | 17,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: WebLayer* DrawingBuffer::PlatformLayer() {
if (!layer_) {
layer_ =
Platform::Current()->CompositorSupport()->CreateExternalTextureLayer(
this);
layer_->SetOpaque(!want_alpha_channel_);
layer_->SetBlendBackgroundColor(want_alpha_channel_);
layer_->SetPremultipliedAlpha(premul... | 0 | 133,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: net::StaticCookiePolicy::Type BrowserContextIOData::GetCookiePolicy() const {
const BrowserContextSharedIOData& data = GetSharedData();
base::AutoLock lock(data.lock);
return data.cookie_policy;
}
Commit Message:
CWE ID: CWE-20 | 0 | 17,204 |
Analyze the following 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 NuPlayer::GenericSource::fetchTextData(
uint32_t sendWhat,
media_track_type type,
int32_t curGen,
sp<AnotherPacketSource> packets,
sp<AMessage> msg) {
int32_t msgGeneration;
CHECK(msg->findInt32("generation", &msgGeneration));
if (msgGeneration != curGen) {
return;
}
int32... | 0 | 160,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: gst_pngdec_get_type (void)
{
static GType pngdec_type = 0;
if (!pngdec_type) {
static const GTypeInfo pngdec_info = {
sizeof (GstPngDecClass),
gst_pngdec_base_init,
NULL,
(GClassInitFunc) gst_pngdec_class_init,
NULL,
NULL,
sizeof (GstPngDec),
0,
(GIns... | 0 | 2,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: inline COMPS_HSList* __comps_objrtree_all(COMPS_ObjRTree * rt, char keyvalpair) {
COMPS_HSList *to_process, *ret;
COMPS_HSListItem *hsit, *oldit;
size_t x;
struct Pair {
char *key;
void *data;
COMPS_HSList *subnodes;
} *pair, *current_pair=NULL;//, *oldpair=NULL;
CO... | 0 | 91,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: ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() {
}
Commit Message: Lock down blob/filesystem URL creation with a stronger CPSP::CanCommitURL()
ChildProcessSecurityPolicy::CanCommitURL() is a security check that's
supposed to tell whether a given renderer process is allowed to commit
a given U... | 0 | 143,750 |
Analyze the following 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 uio_mmap(struct file *filep, struct vm_area_struct *vma)
{
struct uio_listener *listener = filep->private_data;
struct uio_device *idev = listener->dev;
int mi;
unsigned long requested_pages, actual_pages;
int ret = 0;
if (vma->vm_end < vma->vm_start)
return -EINVAL;
vma->vm_private_data = i... | 0 | 28,315 |
Analyze the following 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_ec_curve_id2nid(int curve_id, unsigned int *pflags)
{
const tls_curve_info *cinfo;
/* ECC curves from RFC 4492 and RFC 7027 */
if ((curve_id < 1) || ((unsigned int)curve_id > OSSL_NELEM(nid_list)))
return 0;
cinfo = nid_list + curve_id - 1;
if (pflags)
*pflags = cinfo-... | 0 | 9,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 int prctl_set_mm(int opt, unsigned long addr,
unsigned long arg4, unsigned long arg5)
{
return -EINVAL;
}
Commit Message: mm: fix prctl_set_vma_anon_name
prctl_set_vma_anon_name could attempt to set the name across
two vmas at the same time due to a typo, which might corrupt
the vma list. Fix it to us... | 0 | 162,059 |
Analyze the following 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 TaskService::PostBoundTask(RunnerId runner_id, base::OnceClosure task) {
InstanceId instance_id;
{
base::AutoLock lock(lock_);
if (bound_instance_id_ == kInvalidInstanceId)
return;
instance_id = bound_instance_id_;
}
GetTaskRunner(runner_id)->PostTask(
FROM_HERE, base::BindOnc... | 0 | 132,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: static double outlog(PNG_CONST png_modifier *pm, int in_depth, int out_depth)
{
/* The command line parameters are either 8 bit (0..255) or 16 bit (0..65535)
* and so must be adjusted for low bit depth grayscale:
*/
if (out_depth <= 8)
{
if (pm->log8 == 0) /* switched off */
return 256;
if (ou... | 1 | 173,675 |
Analyze the following 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::ApplyWebPreferencesInternal(const WebPreferences& prefs,
blink::WebView* web_view) {
ApplyWebPreferences(prefs, web_view);
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward... | 0 | 145,087 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bmexec (kwset_t kwset, char const *text, size_t size)
{
/* Help the compiler inline bmexec_trans in two ways, depending on
whether kwset->trans is null. */
return (kwset->trans
? bmexec_trans (kwset, text, size)
: bmexec_trans (kwset, text, size));
}
Commit Message:
CWE ID: CWE-119 | 0 | 5,267 |
Analyze the following 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 OnShowWidget(int routing_id, const gfx::Rect& initial_rect) {
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::BindOnce(&PendingWidgetMessageFilter::OnReceivedRoutingIDOnUI,
this, routing_id));
}
Commit Message: Use unique processe... | 0 | 154,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 bool update_event(conn *c, const int new_flags) {
assert(c != NULL);
struct event_base *base = c->event.ev_base;
if (c->ev_flags == new_flags)
return true;
if (event_del(&c->event) == -1) return false;
event_set(&c->event, c->sfd, new_flags, event_handler, (void *)c);
event... | 0 | 18,299 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: h2_stream *h2_session_open_stream(h2_session *session, int stream_id,
int initiated_on, const h2_request *req)
{
h2_stream * stream;
apr_pool_t *stream_pool;
apr_pool_create(&stream_pool, session->pool);
apr_pool_tag(stream_pool, "h2_stream");
stream... | 0 | 48,653 |
Analyze the following 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 burl_is_unreserved (const int c)
{
return (light_isalnum(c) || c == '-' || c == '.' || c == '_' || c == '~');
}
Commit Message: [core] fix abort in http-parseopts (fixes #2945)
fix abort in server.http-parseopts with url-path-2f-decode enabled
(thx stze)
x-ref:
"Security - SIGABRT during GET ... | 0 | 90,861 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void gs_lib_ctx_fin(gs_memory_t *mem)
{
gs_lib_ctx_t *ctx;
gs_memory_t *ctx_mem;
if (!mem || !mem->gs_lib_ctx)
return;
ctx = mem->gs_lib_ctx;
ctx_mem = ctx->memory;
sjpxd_destroy(mem);
gscms_destroy(ctx_mem);
gs_free_object(ctx_mem, ctx->profiledir,
"gs_lib_c... | 0 | 14,012 |
Analyze the following 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 crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
struct crypto_instance *inst,
const struct crypto_type *frontend)
{
int err = -EINVAL;
if ((alg->cra_flags ^ frontend->type) & frontend->maskset)
goto out;
spawn->frontend = frontend;
err = crypto_init_spawn(spawn... | 0 | 45,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: void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element)
{
m_timeContainers.add(element);
}
Commit Message: SVG: Moving animating <svg> to other iframe should not crash.
Moving SVGSVGElement with its SMILTimeContainer already started caused crash before this patch.
|SVGDocumentExtentions::startA... | 0 | 120,377 |
Analyze the following 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 EditorClientBlackBerry::pageDestroyed()
{
delete this;
}
Commit Message: [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733
Reviewed by Rob Buis.
PR 305194.
Prevent selection for popup input fields as they are buttons.
Informal... | 0 | 104,755 |
Analyze the following 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 OneClickSigninHelper::SetDoNotClearPendingEmailForTesting() {
do_not_clear_pending_email_ = true;
}
Commit Message: During redirects in the one click sign in flow, check the current URL
instead of original URL to validate gaia http headers.
BUG=307159
Review URL: https://codereview.chromium.org/77343002... | 0 | 109,841 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ProcRenderTriangles (ClientPtr client)
{
int rc, ntris;
PicturePtr pSrc, pDst;
PictFormatPtr pFormat;
REQUEST(xRenderTrianglesReq);
REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
if (!PictOpValid (stuff->op))
{
client->errorValue = stuff->op;
return BadValue;
}
VERIFY_PICTUR... | 0 | 14,086 |
Analyze the following 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 cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent,
const u8 *key, unsigned int keylen)
{
struct cryptd_blkcipher_ctx *ctx = crypto_ablkcipher_ctx(parent);
struct crypto_blkcipher *child = ctx->child;
int err;
crypto_blkcipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
crypto_blkcipher... | 0 | 45,646 |
Analyze the following 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_per_block(struct archive *_a, int bytes_per_block)
{
struct archive_write *a = (struct archive_write *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
ARCHIVE_STATE_NEW, "archive_write_set_bytes_per_block");
a->bytes_per_block = bytes_per_block;
return (ARCHIVE_OK);
}
C... | 0 | 34,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: static int tcm_loop_queuecommand(
struct Scsi_Host *sh,
struct scsi_cmnd *sc)
{
struct se_cmd *se_cmd;
struct se_portal_group *se_tpg;
struct tcm_loop_hba *tl_hba;
struct tcm_loop_tpg *tl_tpg;
TL_CDB_DEBUG("tcm_loop_queuecommand() %d:%d:%d:%d got CDB: 0x%02x"
" scsi_buf_len: %u\n", sc->device->host->hos... | 0 | 94,151 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file->f_path.dentry->d_inode;
handle_t *handle;
loff_t new_size;
unsigned int max_blocks;
int ret = 0;
int ret2 = 0;
int retries = 0;
int flags;
struct ext4_map_blocks map;
unsigned int credits, blkbits =... | 0 | 18,596 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void printMAPOpcodeVersion1(const uint8_t *buf)
{
char map_addr[INET6_ADDRSTRLEN];
syslog(LOG_DEBUG, "PCP MAP: v1 Opcode specific information. \n");
syslog(LOG_DEBUG, "MAP protocol: \t\t %d\n", (int)buf[0] );
syslog(LOG_DEBUG, "MAP int port: \t\t %d\n", (int)READNU16(buf+4));
syslog(LOG_DEBUG, "MAP ex... | 0 | 89,824 |
Analyze the following 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 FrameSelection::MoveCaretSelection(const IntPoint& point) {
DCHECK(!GetDocument().NeedsLayoutTreeUpdate());
Element* const editable =
ComputeVisibleSelectionInDOMTree().RootEditableElement();
if (!editable)
return;
const VisiblePosition position =
VisiblePositionForContentsPoint(poi... | 0 | 125,850 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BrowserWindowGtk::Paste() {
gtk_window_util::DoPaste(
window_, chrome::GetActiveWebContents(browser_.get()));
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: ... | 0 | 117,994 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long unix_inq_len(struct sock *sk)
{
struct sk_buff *skb;
long amount = 0;
if (sk->sk_state == TCP_LISTEN)
return -EINVAL;
spin_lock(&sk->sk_receive_queue.lock);
if (sk->sk_type == SOCK_STREAM ||
sk->sk_type == SOCK_SEQPACKET) {
skb_queue_walk(&sk->sk_receive_queue, skb)
amount += skb->len;
} ... | 0 | 19,303 |
Analyze the following 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 HttpNetworkTransactionTest::ConnectStatusHelperWithExpectedStatus(
const MockRead& status, int expected_status) {
HttpRequestInfo request;
request.method = "GET";
request.url = GURL("https://www.google.com/");
request.load_flags = 0;
session_deps_.proxy_service.reset(ProxyService::CreateFixed(... | 0 | 129,263 |
Analyze the following 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 jpc_poc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out)
{
jpc_poc_t *poc = &ms->parms.poc;
jpc_pocpchg_t *pchg;
int pchgno;
for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,
++pchg) {
if (jpc_putuint8(out, pchg->rlvlnostart) ||
((cstate->numcomps > 256) ... | 0 | 72,862 |
Analyze the following 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 tg3_enable_ints(struct tg3 *tp)
{
int i;
tp->irq_sync = 0;
wmb();
tw32(TG3PCI_MISC_HOST_CTRL,
(tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT));
tp->coal_now = tp->coalesce_mode | HOSTCC_MODE_ENABLE;
for (i = 0; i < tp->irq_cnt; i++) {
struct tg3_napi *tnapi = &tp->napi[i];
tw32... | 0 | 32,527 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofputil_decode_port_mod(const struct ofp_header *oh,
struct ofputil_port_mod *pm, bool loose)
{
struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length));
enum ofpraw raw = ofpraw_pull_assert(&b);
if (raw == OFPRAW_OFPT10_PORT_MOD) {
const struct ofp10_port_mod ... | 0 | 77,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: qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream,
GNode * xdxt)
{
int len = QT_UINT32 (xdxt->data);
guint8 *buf = xdxt->data;
guint8 *end = buf + len;
GstBuffer *buffer;
/* skip size and type */
buf += 8;
end -= 8;
while (buf < end) {
gint size;
guint32 ty... | 0 | 4,967 |
Analyze the following 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 bool tcp_need_reset(int state)
{
return (1 << state) &
(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT | TCPF_FIN_WAIT1 |
TCPF_FIN_WAIT2 | TCPF_SYN_RECV);
}
Commit Message: tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
When tcp_disconnect() is called, inet_csk_delack_init() sets
icsk->icsk_ac... | 0 | 61,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: void RenderThreadImpl::PurgePluginListCache(bool reload_pages) {
#if BUILDFLAG(ENABLE_PLUGINS)
blink_platform_impl_->set_plugin_refresh_allowed(false);
blink::ResetPluginCache(reload_pages);
blink_platform_impl_->set_plugin_refresh_allowed(true);
for (auto& observer : observers_)
observer.PluginListC... | 0 | 150,570 |
Analyze the following 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 GDataFileSystem::RemoveObserver(
GDataFileSystemInterface::Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.RemoveObserver(observer);
}
Commit Message: Remove parent* arg from GDataEntry ctor.
* Remove static FromDocumentEntry from GDataEntry, GDataFile, GData... | 0 | 117,024 |
Analyze the following 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 RenderWidgetHostImpl::RestartInputEventAckTimeoutIfNecessary() {
if (input_event_ack_timeout_ && in_flight_event_count_ > 0 && !is_hidden_)
input_event_ack_timeout_->Restart(hung_renderer_delay_);
}
Commit Message: Start rendering timer after first navigation
Currently the new content rendering timer... | 0 | 145,541 |
Analyze the following 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 long usecs_to_jiffies(const unsigned int u)
{
if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET))
return MAX_JIFFY_OFFSET;
#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ);
#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
return u * (HZ / USEC_PER_SEC)... | 0 | 24,728 |
Analyze the following 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 checkMutexInit(void){
pGlobalMutexMethods = sqlite3DefaultMutex();
return SQLITE_OK;
}
Commit Message: sqlite: backport bugfixes for dbfuzz2
Bug: 952406
Change-Id: Icbec429742048d6674828726c96d8e265c41b595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1568152
Reviewed-by:... | 0 | 151,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: virtual status_t getGraphicBufferUsage(
node_id node, OMX_U32 port_index, OMX_U32* usage) {
Parcel data, reply;
data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
data.writeInt32((int32_t)node);
data.writeInt32(port_index);
remote()->transact(GET_GRAPHIC_BUFFER... | 0 | 160,681 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void php_csr_free(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
X509_REQ * csr = (X509_REQ*)rsrc->ptr;
X509_REQ_free(csr);
}
Commit Message:
CWE ID: CWE-119 | 0 | 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: static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute");
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
if (!imp->isValueDirty(... | 0 | 122,166 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DECLAREcpFunc(cpContigTiles2SeparateStrips)
{
return cpImage(in, out,
readContigTilesIntoBuffer,
writeBufferToSeparateStrips,
imagelength, imagewidth, spp);
}
Commit Message: * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
tile width vs image width. Reported as MSVR 35103
by Ax... | 0 | 48,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: TEE_Result syscall_get_time(unsigned long cat, TEE_Time *mytime)
{
TEE_Result res, res2;
struct tee_ta_session *s = NULL;
TEE_Time t;
res = tee_ta_get_current_session(&s);
if (res != TEE_SUCCESS)
return res;
switch (cat) {
case UTEE_TIME_CAT_SYSTEM:
res = tee_time_get_sys_time(&t);
break;
case UTE... | 0 | 86,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: static void get_fs_root_rcu(struct fs_struct *fs, struct path *root)
{
unsigned seq;
do {
seq = read_seqcount_begin(&fs->seq);
*root = fs->root;
} while (read_seqcount_retry(&fs->seq, seq));
}
Commit Message: dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the ... | 0 | 67,355 |
Analyze the following 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 Ins_SZP2( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp2 = CUR.twilight;
break;
case 1:
CUR.zp2 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.GS.gep2 = (Int)(args[0]);
}
Commit Message:
CWE I... | 0 | 5,470 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Eina_Bool ewk_frame_feed_key_up(Evas_Object* ewkFrame, const Evas_Event_Key_Up* upEvent)
{
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(upEvent, false);
DBG("ewkFrame=%p keyname=%s (key=%s, string=%... | 0 | 107,650 |
Analyze the following 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 WebPage::findNextString(const char* text, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches)
{
WebCore::FindOptions findOptions = WebCore::StartInSelection;
if (!forward)
findOptions |= WebCore::Backwards;
if (!caseSensitive)
findOptions |= WebCore::CaseInsensi... | 0 | 104,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: static int out_standby(struct audio_stream *stream)
{
struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
int retVal = 0;
FNLOG();
pthread_mutex_lock(&out->common.lock);
if (out->common.state != AUDIO_A2DP_STATE_SUSPENDED)
retVal = suspend_audio_datapath(&out->common, true);
o... | 0 | 158,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: static void tcp_mtup_probe_failed(struct sock *sk)
{
struct inet_connection_sock *icsk = inet_csk(sk);
icsk->icsk_mtup.search_high = icsk->icsk_mtup.probe_size - 1;
icsk->icsk_mtup.probe_size = 0;
}
Commit Message: tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing h... | 0 | 41,176 |
Analyze the following 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 InputHandler::clearField()
{
if (!isActiveTextEdit())
return;
ASSERT(m_currentFocusElement->document() && m_currentFocusElement->document()->frame() && m_currentFocusElement->document()->frame()->editor());
Editor* editor = m_currentFocusElement->document()->frame()->editor();
edito... | 0 | 104,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: cifs_lock_add(struct cifsFileInfo *cfile, struct cifsLockInfo *lock)
{
struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
down_write(&cinode->lock_sem);
list_add_tail(&lock->llist, &cfile->llist->locks);
up_write(&cinode->lock_sem);
}
Commit Message: cifs: ensure that uncached writes handle unmap... | 0 | 39,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: explicit UrlRecordingHttpAuthHandlerMock(GURL* url) : url_(url) {}
Commit Message: Sanitize headers in Proxy Authentication Required responses
BUG=431504
Review URL: https://codereview.chromium.org/769043003
Cr-Commit-Position: refs/heads/master@{#310014}
CWE ID: CWE-19 | 0 | 129,297 |
Analyze the following 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_packet_access(struct bpf_verifier_env *env, u32 regno, int off,
int size)
{
struct bpf_reg_state *regs = env->cur_state.regs;
struct bpf_reg_state *reg = ®s[regno];
off += reg->off;
if (off < 0 || size <= 0 || off + size > reg->range) {
verbose("invalid access to packet, off=%... | 0 | 65,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: nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
{
struct nfs_open_context *ctx;
struct nfs4_state *state;
unsigned long timeout = NFS4_LOCK_MINTIMEOUT;
int status;
/* verify open state */
ctx = nfs_file_open_context(filp);
state = ctx->state;
if (request->fl_start < 0 || request->f... | 0 | 19,977 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SocketStream::ResponseHeaders::~ResponseHeaders() { data_ = NULL; }
Commit Message: Revert a workaround commit for a Use-After-Free crash.
Revert a workaround commit r20158 for a Use-After-Free issue (http://crbug.com/244746) because a cleaner CL r207218 is landed.
URLRequestContext does not inherit SupportsWea... | 0 | 112,720 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::OnContextMenuClosed(
const CustomContextMenuContext& custom_context) {
if (custom_context.request_id) {
ContextMenuClient* client =
pending_context_menus_.Lookup(custom_context.request_id);
if (client) {
client->OnMenuClosed(custom_context.request_id);
pendi... | 0 | 139,747 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rb_simple_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{
struct trace_array *tr = filp->private_data;
struct ring_buffer *buffer = tr->trace_buffer.buffer;
unsigned long val;
int ret;
ret = kstrtoul_from_user(ubuf, cnt, 10, &val);
if (ret)
return ret;
if (buffer) {
mu... | 0 | 81,318 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void xen_netbk_rx_action(struct xen_netbk *netbk)
{
struct xenvif *vif = NULL, *tmp;
s8 status;
u16 irq, flags;
struct xen_netif_rx_response *resp;
struct sk_buff_head rxq;
struct sk_buff *skb;
LIST_HEAD(notify);
int ret;
int nr_frags;
int count;
unsigned long offset;
struct skb_cb_overlay *sco... | 0 | 34,015 |
Analyze the following 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 ~SingleDriveEntryPropertiesGetter() {}
Commit Message: Reland r286968: The CL borrows ShareDialog from Files.app and add it to Gallery.
Previous Review URL: https://codereview.chromium.org/431293002
BUG=374667
TEST=manually
R=yoshiki@chromium.org, mtomasz@chromium.org
Review URL: https://codereview.... | 0 | 111,796 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int create_lockd_listener(struct svc_serv *serv, const char *name,
struct net *net, const int family,
const unsigned short port)
{
struct svc_xprt *xprt;
xprt = svc_find_xprt(serv, name, net, family, 0);
if (xprt == NULL)
return svc_create_xprt(serv, name, net, family, port,
SVC_SOCK_... | 0 | 65,191 |
Analyze the following 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::didFailLoad(WebFrame* frame, const WebURLError& error) {
FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidFailLoad(frame, error));
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn... | 0 | 99,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 void sock_diag_rcv(struct sk_buff *skb)
{
mutex_lock(&sock_diag_mutex);
netlink_rcv_skb(skb, &sock_diag_rcv_msg);
mutex_unlock(&sock_diag_mutex);
}
Commit Message: sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a fami... | 0 | 33,573 |
Analyze the following 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 sock *__llc_lookup(struct llc_sap *sap,
struct llc_addr *daddr,
struct llc_addr *laddr)
{
struct sock *sk = __llc_lookup_established(sap, daddr, laddr);
return sk ? : llc_lookup_listener(sap, laddr);
}
Commit Message: net/llc: avoid BUG_ON() in skb_orphan()
It seems nobody used LLC si... | 0 | 68,187 |
Analyze the following 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 Browser::SwapTabContents(content::WebContents* old_contents,
content::WebContents* new_contents,
bool did_start_load,
bool did_finish_load) {
if (old_contents && new_contents) {
RenderWidgetHostView* old_view = ol... | 0 | 139,069 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.