instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void SoftVorbis::onReset() {
mInputBufferCount = 0;
mNumFramesOutput = 0;
if (mState != NULL) {
vorbis_dsp_clear(mState);
delete mState;
mState = NULL;
}
if (mVi != NULL) {
vorbis_info_clear(mVi);
delete mVi;
mVi = NULL;
}
mSawInputEos = false;
mSignalledOut... | 0 | 17,503 |
Analyze the following 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 LodePNGText_cleanup(LodePNGInfo* info)
{
size_t i;
for(i = 0; i < info->text_num; i++)
{
string_cleanup(&info->text_keys[i]);
string_cleanup(&info->text_strings[i]);
}
free(info->text_keys);
free(info->text_strings);
}
Commit Message: Fixed #5645: realloc return handling
CWE ID: C... | 0 | 25,074 |
Analyze the following 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 char *get_type(FILE *fp, int obj_id, const xref_t *xref)
{
int is_stream;
char *c, *obj, *endobj;
static char buf[32];
long start;
start = ftell(fp);
if (!(obj = get_object(fp, obj_id, xref, NULL, &is_stream)) ||
is_stream ... | 0 | 12,247 |
Analyze the following 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 discard_port_data(struct port *port)
{
struct port_buffer *buf;
unsigned int err;
if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
return;
}
buf = get_inbuf(port);
err = 0;
while (buf) {
port->stats.bytes_discarded += buf->len - buf->offset;
if (add_inbuf(... | 0 | 12,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: static int ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct blkcipher_walk walk;
blkcipher_walk_init(&walk, dst, src, nbytes);
return ecb_crypt(desc, &walk, false);
}
Commit Message: crypto: prefix module autoloading with "crypt... | 0 | 7,559 |
Analyze the following 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::initSecurityContext()
{
if (haveInitializedSecurityOrigin()) {
ASSERT(securityOrigin());
return;
}
if (!m_frame) {
m_cookieURL = KURL(ParsedURLString, emptyString());
setSecurityOrigin(SecurityOrigin::createUnique());
setContentSecurityPolicy(Con... | 0 | 10,522 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,
struct ip_vs_dest **dest_p)
{
struct ip_vs_dest *dest;
unsigned atype;
EnterFunction(2);
#ifdef CONFIG_IP_VS_IPV6
if (svc->af == AF_INET6) {
atype = ipv6_addr_type(&udest->addr.in6);
if ((!(atype & IPV6_ADDR_UNICAST) |... | 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: static void f_hidg_req_complete(struct usb_ep *ep, struct usb_request *req)
{
struct f_hidg *hidg = (struct f_hidg *)ep->driver_data;
unsigned long flags;
if (req->status != 0) {
ERROR(hidg->func.config->cdev,
"End Point Request ERROR: %d\n", req->status);
}
spin_lock_irqsave(&hidg->write_spinlock, fl... | 0 | 23,851 |
Analyze the following 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 kvm_debugfs_release(struct inode *inode, struct file *file)
{
struct kvm_stat_data *stat_data = (struct kvm_stat_data *)
inode->i_private;
simple_attr_release(inode, file);
kvm_put_kvm(stat_data->kvm);
return 0;
}
Commit Message: KVM: use after free in kvm_ioctl_create_device()
We should... | 0 | 26,272 |
Analyze the following 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 mptsas_reset(DeviceState *dev)
{
MPTSASState *s = MPT_SAS(dev);
mptsas_hard_reset(s);
}
Commit Message:
CWE ID: CWE-787 | 0 | 14,683 |
Analyze the following 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 Element::nodeName() const
{
return m_tagName.toString();
}
Commit Message: Set Attr.ownerDocument in Element#setAttributeNode()
Attr objects can move across documents by setAttributeNode().
So It needs to reset ownerDocument through TreeScopeAdoptr::adoptIfNeeded().
BUG=248950
TEST=set-attribute-nod... | 0 | 28,484 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void fix_msdos_allcaps(LHAFileHeader *header)
{
unsigned int i;
int is_allcaps;
is_allcaps = 1;
if (header->path != NULL) {
for (i = 0; header->path[i] != '\0'; ++i) {
if (islower((unsigned) header->path[i])) {
is_allcaps = 0;
break;
}
}
}
if (is_allcaps && header->filename != N... | 0 | 5,244 |
Analyze the following 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 Gfx::opSetFlat(Object args[], int numArgs) {
state->setFlatness((int)args[0].getNum());
out->updateFlatness(state);
}
Commit Message:
CWE ID: CWE-20 | 0 | 5,855 |
Analyze the following 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_SetReturnNSTriplet(XML_Parser parser, int do_nst)
{
if (parser == NULL)
return;
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (parser->m_parsingStatus.parsing == XML_PARSING || parser->m_parsingStatus.parsing == XML_SUSPENDED)
return;
parser->m_ns_triplets = do_nst ? XML_T... | 0 | 18,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: void Editor::Transpose() {
if (!CanEdit())
//// TODO(yosin): We should move |Transpose()| into |ExecuteTranspose()| in
//// "EditorCommand.cpp"
return;
GetFrame().GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
const EphemeralRange& range = ComputeRangeForTranspose(GetFrame());
if... | 1 | 7,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: get_tb_count(struct fp_info *p_fp_info)
{
int chan, tb_count = 0;
for (chan = 0; chan < p_fp_info->num_chans; chan++) {
tb_count += p_fp_info->chan_num_tbs[chan];
}
return tb_count;
}
Commit Message: UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our... | 0 | 3,984 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool MediaElementAudioSourceHandler::WouldTaintOrigin() {
if (MediaElement()->GetWebMediaPlayer()->DidPassCORSAccessCheck()) {
return false;
}
if (!MediaElement()->HasSingleSecurityOrigin()) {
return true;
}
return Context()->WouldTaintOrigin(MediaElement()->currentSrc());
}
Commit Message: S... | 1 | 992 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: isoent_cmp_key_iso9660(const struct archive_rb_node *node, const void *key)
{
const struct isoent *isoent = (const struct isoent *)key;
const struct idrent *idrent = (const struct idrent *)node;
return (isoent_cmp_iso9660_identifier(isoent, idrent->isoent));
}
Commit Message: Issue 711: Be more careful abou... | 0 | 6,945 |
Analyze the following 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 auxc_dump(GF_Box *a, FILE * trace)
{
GF_AuxiliaryTypePropertyBox *ptr = (GF_AuxiliaryTypePropertyBox *)a;
gf_isom_box_dump_start(a, "AuxiliaryTypePropertyBox", trace);
fprintf(trace, "aux_type=\"%s\" ", ptr->aux_urn);
dump_data_attribute(trace, "aux_subtype", ptr->data, ptr->data_size);
fprintf(trace... | 0 | 5,014 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: EncryptionMode DetermineEncryptionMode(
const EncryptionScheme& encryption_scheme) {
switch (encryption_scheme.mode()) {
case EncryptionScheme::CIPHER_MODE_UNENCRYPTED:
return EncryptionMode::kUnencrypted;
case EncryptionScheme::CIPHER_MODE_AES_CTR:
return EncryptionMode::kCenc;
case... | 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: bool PopupContainer::handleTouchEvent(const PlatformTouchEvent&)
{
return false;
}
Commit Message: [REGRESSION] Refreshed autofill popup renders garbage
https://bugs.webkit.org/show_bug.cgi?id=83255
http://code.google.com/p/chromium/issues/detail?id=118374
The code used to update only the PopupContainer coo... | 0 | 26,651 |
Analyze the following 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 ucma_copy_iboe_route(struct rdma_ucm_query_route_resp *resp,
struct rdma_route *route)
{
resp->num_paths = route->num_paths;
switch (route->num_paths) {
case 0:
rdma_ip2gid((struct sockaddr *)&route->addr.dst_addr,
(union ib_gid *)&resp->ib_route[0].dgid);
rdma_ip2gid((struct socka... | 0 | 2,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 AutofillDialogViews::NonClientMousePressed() {
delegate_->FocusMoved();
}
Commit Message: Clear out some minor TODOs.
BUG=none
Review URL: https://codereview.chromium.org/1047063002
Cr-Commit-Position: refs/heads/master@{#322959}
CWE ID: CWE-20 | 0 | 27,186 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int DecodeIPV6Packet (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, uint16_t len)
{
if (unlikely(len < IPV6_HEADER_LEN)) {
return -1;
}
if (unlikely(IP_GET_RAW_VER(pkt) != 6)) {
SCLogDebug("wrong ip version %" PRIu8 "",IP_GET_RAW_VER(pkt));
ENGINE_SET_... | 0 | 648 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ssize_t btrfs_getxattr(struct dentry *dentry, const char *name,
void *buffer, size_t size)
{
/*
* If this is a request for a synthetic attribute in the system.*
* namespace use the generic infrastructure to resolve a handler
* for it via sb->s_xattr.
*/
if (!strncmp(name, XATTR_SYSTEM_PREFIX, X... | 0 | 15,658 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int cbc_decrypt(struct blkcipher_desc *desc,
struct scatterlist *dst, struct scatterlist *src,
unsigned int nbytes)
{
struct crypto_sparc64_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
u64 *key_end;
int err;
blkcipher_walk_init(&walk, dst, src, nbytes)... | 0 | 14,589 |
Analyze the following 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_output(struct archive_write *a, const void *buff, size_t length)
{
return (__archive_write_filter(a->filter_first, buff, length));
}
Commit Message: Limit write requests to at most INT_MAX.
This prevents a certain common programming error (passing -1 to write)
from leading to other problems deep... | 0 | 9,135 |
Analyze the following 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 struct perf_event_map *sparc_map_cache_event(u64 config)
{
unsigned int cache_type, cache_op, cache_result;
const struct perf_event_map *pmap;
if (!sparc_pmu->cache_map)
return ERR_PTR(-ENOENT);
cache_type = (config >> 0) & 0xff;
if (cache_type >= PERF_COUNT_HW_CACHE_MAX)
return ERR_PTR(-... | 0 | 20,496 |
Analyze the following 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 LayerWebKitThread::commitPendingTextureUploads()
{
layerCompositingThread()->commitPendingTextureUploads();
}
Commit Message: [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=111997
Patch by Alberto Garcia <agarcia@igalia.com> on 2013-... | 0 | 24,148 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: monitor_allowed_key(u_char *blob, u_int bloblen)
{
/* make sure key is allowed */
if (key_blob == NULL || key_bloblen != bloblen ||
timingsafe_bcmp(key_blob, blob, key_bloblen))
return (0);
return (1);
}
Commit Message: set sshpam_ctxt to NULL after free
Avoids use-after-free in monitor when privsep c... | 0 | 22,958 |
Analyze the following 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 HostCache::Entry* HostCache::LookupStale(
const Key& key,
base::TimeTicks now,
HostCache::EntryStaleness* stale_out) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (caching_is_disabled())
return nullptr;
HostCache::Entry* entry = LookupInternal(key);
if (!entry) {
RecordLo... | 0 | 8,207 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: print_vendor_attr(netdissect_options *ndo,
register const u_char *data, u_int length, u_short attr_code _U_)
{
u_int idx;
u_int vendor_id;
u_int vendor_type;
u_int vendor_length;
if (length < 4)
goto trunc;
ND_TCHECK2(*data, 4);
vendor_id = EXTRACT_32BITS(dat... | 0 | 2,125 |
Analyze the following 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 FakeCrosDisksClient::Mount(const std::string& source_path,
const std::string& source_format,
const std::string& mount_label,
const std::vector<std::string>& mount_options,
MountAcce... | 1 | 12,567 |
Analyze the following 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 ChromeContentRendererClient::WillSendRequest(WebKit::WebFrame* frame,
const GURL& url,
GURL* new_url) {
if (url.SchemeIs(chrome::kExtensionScheme) &&
!ExtensionResourceRequestPolicy::CanRequestResource... | 0 | 7,567 |
Analyze the following 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 SelectionInFlatTree ExtendSelectionAsNonDirectional(
const PositionInFlatTree& position,
const VisibleSelectionInFlatTree& selection,
TextGranularity granularity) {
DCHECK(!selection.IsNone());
DCHECK(position.IsNotNull());
const PositionInFlatTree& start = selection.Start();
const Posi... | 0 | 16,525 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cmsTagTypeSignature DecideLUTtypeA2B(cmsFloat64Number ICCVersion, const void *Data)
{
cmsPipeline* Lut = (cmsPipeline*) Data;
if (ICCVersion < 4.0) {
if (Lut ->SaveAs8Bits) return cmsSigLut8Type;
return cmsSigLut16Type;
}
else {
return cmsSigLutAtoBType;
}
}
Commit M... | 0 | 17,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: tt_check_trickyness( FT_Face face )
{
if ( !face )
return FALSE;
/* For first, check the face name for quick check. */
if ( face->family_name &&
tt_check_trickyness_family( face->family_name ) )
return TRUE;
/* Type42 fonts may lack `name' ... | 0 | 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: setcolor_cont(i_ctx_t *i_ctx_p)
{
ref arr, *parr = &arr;
es_ptr ep = esp;
int i=0, code = 0, usealternate, stage, stack_depth, CIESubst = 0, IsICC = 0;
unsigned int depth;
PS_colour_space_t *obj;
stack_depth = (int)ep[-3].value.intval;
depth = (unsigned int)ep[-2].value.intval;
st... | 0 | 19,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: bool XmlReader::SkipToElement() {
do {
switch (NodeType()) {
case XML_READER_TYPE_ELEMENT:
return true;
case XML_READER_TYPE_END_ELEMENT:
return false;
default:
continue;
}
} while (Read());
return false;
}
Commit Message: Roll libxml to 3939178e4cb797417ff033b1e04ab4b... | 0 | 26,344 |
Analyze the following 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 dispatchDataCall(Parcel& p, RequestInfo *pRI) {
const int numParamsRilV3 = 6;
int pos = p.dataPosition();
int numParams = p.readInt32();
if (s_callbacks.version < 4 && numParams > numParamsRilV3) {
Parcel p2;
p2.appendFrom(&p, 0, pos);
p2.writeInt32(numParamsRilV3);
for(int i = 0; ... | 0 | 10,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: static void ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t *olen )
{
unsigned char *p = buf;
if( ssl->secure_renegotiation != MBEDTLS_SSL_SECURE_RENEGOTIATION )
{
*olen = 0;
... | 0 | 22,455 |
Analyze the following 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 socket *get_socket(int fd)
{
struct socket *sock;
/* special case to disable backend */
if (fd == -1)
return NULL;
sock = get_raw_socket(fd);
if (!IS_ERR(sock))
return sock;
sock = get_tap_socket(fd);
if (!IS_ERR(sock))
return sock;
return ERR_PTR(-ENOTSOCK);
}
Commit Message: vhost-... | 0 | 23,244 |
Analyze the following 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 FDrive *drv3(FDCtrl *fdctrl)
{
if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (3 << 2))
return &fdctrl->drives[3];
else
return &fdctrl->drives[2];
}
Commit Message:
CWE ID: CWE-119 | 0 | 8,857 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static USBDevice *ohci_find_device(OHCIState *ohci, uint8_t addr)
{
USBDevice *dev;
int i;
for (i = 0; i < ohci->num_ports; i++) {
if ((ohci->rhport[i].ctrl & OHCI_PORT_PES) == 0) {
continue;
}
dev = usb_find_device(&ohci->rhport[i].port, addr);
if (dev != ... | 0 | 29,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: void ContainerNode::resumePostAttachCallbacks()
{
if (s_attachDepth == 1) {
RefPtr<ContainerNode> protect(this);
if (s_postAttachCallbackQueue)
dispatchPostAttachCallbacks();
if (s_shouldReEnableMemoryCacheCallsAfterAttach) {
s_shouldReEnableMemoryCacheCallsAft... | 0 | 20,963 |
Analyze the following 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 ldb_dn *ldb_dn_new(TALLOC_CTX *mem_ctx,
struct ldb_context *ldb,
const char *strdn)
{
struct ldb_val blob;
blob.data = discard_const_p(uint8_t, strdn);
blob.length = strdn ? strlen(strdn) : 0;
return ldb_dn_from_ldb_val(mem_ctx, ldb, &blob);
}
Commit Message:
CWE ID: CWE-200 | 0 | 29,842 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer)
{
if ((buffer == NULL) || (buffer->content == NULL))
{
return NULL;
}
while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32))
{
buffer->offset++;
}
if (buffer->offset == buff... | 0 | 25,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: MockDownloadItemFactory::MockDownloadItemFactory() {}
Commit Message: Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due to CrOS failure) with the completion logic moved to after the
auto-opening. The tests that test th... | 0 | 11,330 |
Analyze the following 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 pfunc stream_token(struct jv_parser* p, char ch) {
jv_kind k;
jv last;
switch (ch) {
case '[':
if (jv_is_valid(p->next))
return "Expected a separator between values";
p->path = jv_array_append(p->path, jv_number(0)); // push
p->last_seen = JV_LAST_OPEN_ARRAY;
p->stacklen++;
... | 0 | 23,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: static struct sctp_packet *sctp_abort_pkt_new(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
struct sctp_chunk *chunk,
const void *payload,
size_t paylen)
{
struct sctp_packet *packet;
struct sctp_chunk *abort;
packet = sctp_ootb_pkt_new(net... | 0 | 23,748 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width, const unsigned int height)
{
const unsigned long new_width = MAX(1, width);
const unsigned long new_height = MAX(1, height);
const float dx = (float)im->sx / (float)new_width;
const float dy = (float)im->sy / (float)new_height;
... | 0 | 10,890 |
Analyze the following 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 cryp_dma_read(struct cryp_ctx *ctx, struct scatterlist *sg, int len)
{
int error = cryp_set_dma_transfer(ctx, sg, len, DMA_FROM_DEVICE);
if (error) {
dev_dbg(ctx->device->dev, "[%s]: cryp_set_dma_transfer() "
"failed", __func__);
return error;
}
return len;
}
Commit Message: crypto: prefix... | 0 | 9,636 |
Analyze the following 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 ~EventTestWindow() {}
Commit Message: Removed requirement for ash::Window::transient_parent() presence for system modal dialogs.
BUG=130420
TEST=SystemModalContainerLayoutManagerTest.ModalTransientAndNonTransient
Review URL: https://chromiumcodereview.appspot.com/10514012
git-svn-id: svn://svn.chrom... | 0 | 29,927 |
Analyze the following 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_add_ipc_client(
const char *name, int priority, size_t max_size, void *userdata, struct ipc_client_callbacks *callbacks)
{
mainloop_io_t *client = NULL;
crm_ipc_t *conn = crm_ipc_new(name, max_size);
if(conn && crm_ipc_connect(conn)) {
int32_t fd = crm_ipc_get_fd(conn);
... | 0 | 29,694 |
Analyze the following 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 dn_socket_seq_show(struct seq_file *seq, void *v)
{
if (v == SEQ_START_TOKEN) {
seq_puts(seq, "Local Remote\n");
} else {
dn_socket_format_entry(seq, v);
}
return 0;
}
Commit Message: net: add validation for the socket syscall protocol argument
郭永刚... | 0 | 4,942 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static v8::Handle<v8::Value> methodWithSequenceArgCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TestObj.methodWithSequenceArg");
if (args.Length() < 1)
return V8Proxy::throwNotEnoughArgumentsError();
TestObj* imp = V8TestObj::toNative(args.Holder());
EXCEPTION_BLOCK(sequence<Sc... | 1 | 29,578 |
Analyze the following 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 int git_index__create_mode(unsigned int mode)
{
if (S_ISLNK(mode))
return S_IFLNK;
if (S_ISDIR(mode) || (mode & S_IFMT) == (S_IFLNK | S_IFDIR))
return (S_IFLNK | S_IFDIR);
return S_IFREG | GIT_PERMS_CANONICAL(mode);
}
Commit Message: index: convert `read_entry` to return entry size via an out-p... | 0 | 25,023 |
Analyze the following 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 SkIcoCodec::chooseCodec(const SkISize& requestedSize, int startIndex) {
SkASSERT(startIndex >= 0);
for (int i = startIndex; i < fEmbeddedCodecs->count(); i++) {
if (fEmbeddedCodecs->operator[](i)->getInfo().dimensions() == requestedSize) {
return i;
}
}
return -1;
}
Commit Message: RESTRICT AUTOMERG... | 0 | 14,330 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8TestObject::VoidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_voidMethodDefaultTrueBooleanArg");
test_object_v8_internal::VoidMethodDefaultTrueBooleanArgMethod(info);
}
Com... | 0 | 1,779 |
Analyze the following 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 file *open_exec(const char *name)
{
struct file *file;
int err;
struct filename tmp = { .name = name };
static const struct open_flags open_exec_flags = {
.open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
.acc_mode = MAY_EXEC | MAY_OPEN,
.intent = LOOKUP_OPEN
};
file = do_filp_open(AT_FDCWD,... | 0 | 14,431 |
Analyze the following 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 sync_descbuffer_for_cpu(struct b43_dmaring *ring,
dma_addr_t addr, size_t len)
{
B43_WARN_ON(ring->tx);
dma_sync_single_for_cpu(ring->dev->dev->dma_dev,
addr, len, DMA_FROM_DEVICE);
}
Commit Message: b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put i... | 0 | 21,523 |
Analyze the following 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 fz_cmm_engine *fz_get_cmm_engine(fz_context *ctx)
{
return ctx->colorspace ? ctx->colorspace->cmm : NULL;
}
Commit Message:
CWE ID: CWE-20 | 0 | 8,632 |
Analyze the following 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 HistoryController::UpdateForCommit(RenderFrameImpl* frame,
const WebHistoryItem& item,
WebHistoryCommitType commit_type,
bool navigation_within_page) {
switch (commit_type) {
case bl... | 1 | 1,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: psf_is_pipe (SF_PRIVATE *psf)
{
if (psf->virtual_io)
return SF_FALSE ;
if (GetFileType (psf->file.handle) == FILE_TYPE_DISK)
return SF_FALSE ;
/* Default to maximum safety. */
return SF_TRUE ;
} /* psf_is_pipe */
Commit Message: src/file_io.c : Prevent potential divide-by-zero.
Closes: https://github.... | 0 | 24,127 |
Analyze the following 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 ssize_t object_size_show(struct kmem_cache *s, char *buf)
{
return sprintf(buf, "%d\n", s->objsize);
}
Commit Message: remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn'... | 0 | 26,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 WebRuntimeFeatures::EnableCacheInlineScriptCode(bool enable) {
RuntimeEnabledFeatures::SetCacheInlineScriptCodeEnabled(enable);
}
Commit Message: Remove RequireCSSExtensionForFile runtime enabled flag.
The feature has long since been stable (since M64) and doesn't seem
to be a need for this flag.
BUG=78... | 0 | 16,160 |
Analyze the following 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 Reset() {
tap_x_ = -1;
tap_y_ = -1;
longpress_x_ = -1;
longpress_y_ = -1;
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
... | 0 | 6,690 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xsltUTF8Charcmp(xmlChar *utf1, xmlChar *utf2) {
if (utf1 == NULL ) {
if (utf2 == NULL)
return 0;
return -1;
}
return xmlStrncmp(utf1, utf2, xsltUTF8Size(utf1));
}
Commit Message: Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7
BUG=583156,583171
Review URL: http... | 0 | 22,393 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer buffer,
GLsizei width,
GLsizei height,
GLenum internalformat) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLI... | 0 | 18,600 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ChromeContentBrowserClient::RequestFileSystemPermissionOnUIThread(
int render_process_id,
int render_frame_id,
const GURL& url,
bool allowed_by_default,
const base::Callback<void(bool)>& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
extensions::WebViewPermissionHelper* web_view_... | 0 | 18,430 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ProxyChannelDelegate::ProxyChannelDelegate()
: shutdown_event_(true, false) {
}
Commit Message: Revert 143656 - Add an IPC channel between the NaCl loader process and the renderer.
BUG=116317
TEST=ppapi, nacl tests, manual testing for experimental IPC proxy.
Review URL: https://chromiumcodereview.appspot.com... | 1 | 6,622 |
Analyze the following 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_vmentry_postreqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
u32 *exit_qual)
{
bool ia32e;
*exit_qual = ENTRY_FAIL_DEFAULT;
if (!nested_guest_cr0_valid(vcpu, vmcs12->guest_cr0) ||
!nested_guest_cr4_valid(vcpu, vmcs12->guest_cr4))
return 1;
if (!nested_cpu_has2(vmcs12, SECOND... | 0 | 7,305 |
Analyze the following 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 rtnl_af_register(struct rtnl_af_ops *ops)
{
rtnl_lock();
list_add_tail(&ops->list, &rtnl_af_ops);
rtnl_unlock();
}
Commit Message: net: fix infoleak in rtnetlink
The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initializ... | 0 | 7,111 |
Analyze the following 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_timer_stop(struct snd_timer_instance * timeri,
int keep_flag, int event)
{
struct snd_timer *timer;
unsigned long flags;
if (snd_BUG_ON(!timeri))
return -ENXIO;
if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE) {
if (!keep_flag) {
spin_lock_irqsave(&slave_active_lock, flags);
ti... | 1 | 1,202 |
Analyze the following 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::ShowSigninErrorBubble(Browser* browser,
const std::string& error) {
DCHECK(!error.empty());
browser->window()->ShowOneClickSigninBubble(
BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE,
string16(), /* no SAML email */
... | 0 | 8,340 |
Analyze the following 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 InputHandler::selectionAtEndOfElement()
{
if (!isActiveTextEdit())
return false;
ASSERT(m_currentFocusElement->document() && m_currentFocusElement->document()->frame());
return selectionStart() == static_cast<int>(elementText().length());
}
Commit Message: [BlackBerry] Adapt to new Bla... | 0 | 23,512 |
Analyze the following 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::DoUniform3fv(
GLint location,
GLsizei count,
const volatile GLfloat* v) {
api()->glUniform3fvFn(location, count, const_cast<const GLfloat*>(v));
return error::kNoError;
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL... | 0 | 16,310 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void CoordinatorImpl::RegisterHeapProfiler(
mojom::HeapProfilerPtr heap_profiler) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
heap_profiler_ = std::move(heap_profiler);
}
Commit Message: Fix heap-use-after-free by using weak factory instead of Unretained
Bug: 856578
Change-Id: Ifb2a1b7e6c22e1af36e... | 0 | 10,958 |
Analyze the following 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 Con_PageDown( void ) {
con.display += 2;
if ( con.display > con.current ) {
con.display = con.current;
}
}
Commit Message: All: Merge some file writing extension checks
CWE ID: CWE-269 | 0 | 15,631 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
{
struct dwc3_gadget_ep_cmd_params params;
struct dwc3 *dwc = dep->dwc;
int ret;
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
dev_err(dwc->dev, "%s is of Isochronous type\n", dep->name);
return -EINVAL;
}
memset(&p... | 0 | 2,565 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pop_context ()
{
pop_dollar_vars ();
variable_context--;
pop_var_context ();
sv_ifs ("IFS"); /* XXX here for now */
}
Commit Message:
CWE ID: CWE-119 | 0 | 6,944 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: dir_scan_callback(struct de *de, void *data)
{
struct dir_scan_data *dsd = (struct dir_scan_data *)data;
if ((dsd->entries == NULL) || (dsd->num_entries >= dsd->arr_size)) {
dsd->arr_size *= 2;
dsd->entries =
(struct de *)realloc2(dsd->entries,
dsd->arr_size * sizeof(dsd->... | 0 | 29,563 |
Analyze the following 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 MockRenderThread::WidgetRestored() {
}
Commit Message: Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b... | 0 | 15,827 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SPR_WhereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = whereIsIt(call, aid, apos, &cid);
osi_auditU(call, PTS_WheIsItEvent, code, AUD_ID, aid, AUD_LONG, *apos,
AUD_END);
ViceLog(125, ("PTS_WhereIsIt: code %d cid %d aid... | 0 | 23,063 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PreresolveJob::PreresolveJob(const GURL& url,
int num_sockets,
bool allow_credentials,
net::NetworkIsolationKey network_isolation_key,
PreresolveInfo* info)
: url(url),
num_sockets(num_soc... | 0 | 23,674 |
Analyze the following 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 uncurl_attach_net(struct uncurl_conn *ucc)
{
ucc->ctx = ucc->net;
ucc->read = net_read;
ucc->write = net_write;
}
Commit Message: origin matching must come at str end
CWE ID: CWE-352 | 0 | 17,380 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: server_log_http(struct client *clt, unsigned int code, size_t len)
{
static char tstamp[64];
static char ip[INET6_ADDRSTRLEN];
time_t t;
struct kv key, *agent, *referrer;
struct tm *tm;
struct server_config *srv_conf;
struct http_descriptor *desc;
int ret = -1;
char *user = NULL;
char *... | 0 | 11,603 |
Analyze the following 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 BrowserEventRouter::PageActionExecuted(Profile* profile,
const ExtensionAction& page_action,
int tab_id,
const std::string& url,
int ... | 0 | 27,960 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void ati_remote2_kill_urbs(struct ati_remote2 *ar2)
{
usb_kill_urb(ar2->urb[1]);
usb_kill_urb(ar2->urb[0]);
}
Commit Message: Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious de... | 0 | 27,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: virtual void SetUp() {
InitializeConfig();
SetMode(GET_PARAM(1));
set_cpu_used_ = GET_PARAM(2);
}
Commit Message: Merge Conflict Fix CL to lmp-mr1-release for ag/849478
DO NOT MERGE - libvpx: Pull from upstream
Current HEAD: 7105df53d7dc13d5e575bc8df714ec8d1da36b06
BUG=23452792
Change-Id: ... | 1 | 13,305 |
Analyze the following 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 SyncBackendHost::Core::OnUpdatedToken(const std::string& token) {
if (!sync_loop_)
return;
DCHECK_EQ(MessageLoop::current(), sync_loop_);
host_.Call(
FROM_HERE,
&SyncBackendHost::NotifyUpdatedToken, token);
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by... | 0 | 612 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DecodePosixTimezone(char *str, int *tzp)
{
int val,
tz;
int type;
char *cp;
char delim;
cp = str;
while (*cp != '\0' && isalpha((unsigned char) *cp))
cp++;
if (DecodeTimezone(cp, &tz) != 0)
return -1;
delim = *cp;
*cp = '\0';
type = DecodeSpecial(MAXDATEFIELDS - 1, str, &val);
*cp = ... | 0 | 27,046 |
Analyze the following 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 reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjectPytho... | 0 | 3,351 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_FUNCTION(mcrypt_cfb)
{
zval **mode;
char *cipher, *key, *data, *iv = NULL;
int cipher_len, key_len, data_len, iv_len = 0;
MCRYPT_GET_CRYPT_ARGS
convert_to_long_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, data_len, "cfb", iv, iv_len, ZEND_NUM_ARGS(), Z_LVAL_PP(mode), return_value TS... | 1 | 5,754 |
Analyze the following 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 ud_interception(struct vcpu_svm *svm)
{
int er;
er = emulate_instruction(&svm->vcpu, EMULTYPE_TRAP_UD);
if (er != EMULATE_DONE)
kvm_queue_exception(&svm->vcpu, UD_VECTOR);
return 1;
}
Commit Message: KVM: x86: work around infinite loop in microcode when #AC is delivered
It was found that a g... | 0 | 11,120 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8TestObject::MeasuredLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_measuredLongAttribute_Getter");
ExecutionContext* execution_context_for_measurement = CurrentExecutionContext(in... | 0 | 23,551 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
unsigned char comp_id, curve_id[2];
EVP_PKEY *pkey;
int rv;
pkey = X509_get_pubkey(x);
if (!pkey)
return 0;
/* If not EC nothing to do */
if (pkey->type != EVP_PKEY_EC)
{
EVP_PKEY_free(pkey);
return 1;
}
rv = tls1_set_ec_id(curv... | 0 | 10,134 |
Analyze the following 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::RendererResponsive(
RenderWidgetHostImpl* render_widget_host) {
if (delegate_)
delegate_->RendererResponsive(this, render_widget_host);
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be ab... | 0 | 24,794 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: frag6_print(netdissect_options *ndo, register const u_char *bp, register const u_char *bp2)
{
register const struct ip6_frag *dp;
register const struct ip6_hdr *ip6;
dp = (const struct ip6_frag *)bp;
ip6 = (const struct ip6_hdr *)bp2;
ND_TCHECK(dp->ip6f_offlg);
if (ndo->ndo_vflag) {
ND_PRINT((ndo... | 1 | 372 |
Analyze the following 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 mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
int ret = 0;
ECDSA_VALIDATE_RET( ctx != NULL );
ECDSA_VALIDATE_RET( f_rng != NULL );
ret = mbedtls_ecp_group_load( &ctx->grp, gid );
... | 0 | 6,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.