mahdin70/CodeBERT-PrimeVul-BigVul
Text Classification • 0.1B • Updated • 53
project stringclasses 788
values | commit_id stringlengths 6 81 | CVE ID stringlengths 13 16 | CWE ID stringclasses 126
values | func stringlengths 14 482k | vul int8 0 1 |
|---|---|---|---|---|---|
linux | bcc5364bdcfe131e6379363f089e7b4108d35b70 | NOT_APPLICABLE | NOT_APPLICABLE | static void prb_fill_curr_block(char *curr,
struct tpacket_kbdq_core *pkc,
struct tpacket_block_desc *pbd,
unsigned int len)
{
struct tpacket3_hdr *ppd;
ppd = (struct tpacket3_hdr *)curr;
ppd->tp_next_offset = TOTAL_PKT_LEN_INCL_ALIGN(len);
pkc->prev = curr;
pkc->nxt_offset += TOTAL_PKT_LEN_INCL_ALIG... | 0 |
linux | d3bd7413e0ca40b60cf60d4003246d067cafdeda | NOT_APPLICABLE | NOT_APPLICABLE | static bool reg_is_refcounted_or_null(const struct bpf_reg_state *reg)
{
return type_is_refcounted_or_null(reg->type);
}
| 0 |
Chrome | eea3300239f0b53e172a320eb8de59d0bea65f27 | NOT_APPLICABLE | NOT_APPLICABLE | void DevToolsUIBindings::FrontendWebContentsObserver::RenderProcessGone(
base::TerminationStatus status) {
bool crashed = true;
switch (status) {
case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
case base::TERMINATION_STATUS_PROCESS_WAS_KILLED:
#if defined(OS_CHROMEOS)
case base::TERMINATION_S... | 0 |
linux | 9aacdd354d197ad64685941b36d28ea20ab88757 | NOT_APPLICABLE | NOT_APPLICABLE | static inline void hugetlb_set_vma_policy(struct vm_area_struct *vma,
struct inode *inode, pgoff_t index)
{
} | 0 |
cups | afa80cb2b457bf8d64f775bed307588610476c41 | NOT_APPLICABLE | NOT_APPLICABLE | write_file(cupsd_client_t *con, /* I - Client connection */
http_status_t code, /* I - HTTP status */
char *filename, /* I - Filename */
char *type, /* I - File type */
struct stat *filestats) /* O - File information */
{
con->file = open(filename, O_RDONLY);
cupsdL... | 0 |
linux-2.6 | 194b3da873fd334ef183806db751473512af29ce | NOT_APPLICABLE | NOT_APPLICABLE | static int agp_return_size(void)
{
int current_size;
void *temp;
temp = agp_bridge->current_size;
switch (agp_bridge->driver->size_type) {
case U8_APER_SIZE:
current_size = A_SIZE_8(temp)->size;
break;
case U16_APER_SIZE:
current_size = A_SIZE_16(temp)->size;
break;
case U32_APER_SIZE:
current_size =... | 0 |
Chrome | d6cc2749d2f90acc2d92a526c1d2cbebbc101a19 | NOT_APPLICABLE | NOT_APPLICABLE | void SyncManager::UpdateEnabledTypes() {
DCHECK(thread_checker_.CalledOnValidThread());
data_->UpdateEnabledTypes();
}
| 0 |
OpenSC | c246f6f69a749d4f68626b40795a4f69168008f4 | NOT_APPLICABLE | NOT_APPLICABLE | static int coolkey_write_binary(sc_card_t *card, unsigned int idx,
const u8 *buf, size_t count, unsigned long flags)
{
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
LOG_FUNC_RETURN(card->ctx, SC_ERROR_NOT_SUPPORTED);
} | 0 |
Chrome | bf6a6765d44b09c64b8c75d749efb84742a250e7 | NOT_APPLICABLE | NOT_APPLICABLE | pp::Instance* PDFiumEngine::GetPluginInstance() {
return client_->GetPluginInstance();
}
| 0 |
libgit2 | 4ac39c76c0153d1ee6889a0984c39e97731684b2 | NOT_APPLICABLE | NOT_APPLICABLE | int git_pkt_buffer_done(git_buf *buf)
{
return git_buf_puts(buf, pkt_done_str);
} | 0 |
rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | NOT_APPLICABLE | NOT_APPLICABLE | static uint64_t htonll(uint64_t n)
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint32_t *i = (uint32_t*)&n;
uint32_t b = i[0];
i[0] = htonl(i[1]);
i[1] = htonl(b);
#endif
return n;
} | 0 |
mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | NOT_APPLICABLE | NOT_APPLICABLE | static MonoException* mono_thread_execute_interruption (MonoInternalThread *thread)
{
ensure_synch_cs_set (thread);
EnterCriticalSection (thread->synch_cs);
/* MonoThread::interruption_requested can only be changed with atomics */
if (InterlockedCompareExchange (&thread->interruption_requested, FALSE, TRUE)) {
... | 0 |
libxml2 | 92b9e8c8b3787068565a1820ba575d042f9eec66 | NOT_APPLICABLE | NOT_APPLICABLE | xmlIsDocNameChar(xmlDocPtr doc, int c) {
if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
/*
* Use the new checks of production [4] [4a] amd [5] of the
* Update 5 of XML-1.0
*/
if (((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ||
((c >= '0') && (c <= '9')) || /* !st... | 0 |
php-src | e3133e4db70476fb7adfdedb738483e2255ce0e1 | NOT_APPLICABLE | NOT_APPLICABLE | static size_t php_plain_files_dirstream_read(php_stream *stream, char *buf, size_t count)
{
DIR *dir = (DIR*)stream->abstract;
/* avoid libc5 readdir problems */
char entry[sizeof(struct dirent)+MAXPATHLEN];
struct dirent *result = (struct dirent *)&entry;
php_stream_dirent *ent = (php_stream_dirent*)buf;
/* avo... | 0 |
linux | 90481622d75715bfcb68501280a917dbfe516029 | NOT_APPLICABLE | NOT_APPLICABLE | static void hugetlbfs_i_callback(struct rcu_head *head)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode));
}
| 0 |
exif | eb84b0e3c5f2a86013b6fcfb800d187896a648fa | NOT_APPLICABLE | NOT_APPLICABLE | show_entry_list (ExifEntry *e, void *data)
{
const ExifParams *p = data;
char v[TAG_VALUE_BUF];
ExifIfd ifd = exif_entry_get_ifd (e);
const char *str;
int fieldwidth, bytes;
size_t width;
if (p->use_ids)
printf("0x%04x", e->tag);
else {
str = C(exif_tag_get_title_in_ifd (e->tag, ifd));
fieldwidth = width... | 0 |
vim | 806d037671e133bd28a7864248763f643967973a | NOT_APPLICABLE | NOT_APPLICABLE | ins_bs(
int c,
int mode,
int *inserted_space_p)
{
linenr_T lnum;
int cc;
int temp = 0; // init for GCC
colnr_T save_col;
colnr_T mincol;
int did_backspace = FALSE;
int in_indent;
int oldState;
int cpc[MAX_MCO]; // composing characters
#if defined(FEAT_LIS... | 0 |
envoy | e9f936d85dc1edc34fabd0a1725ec180f2316353 | NOT_APPLICABLE | NOT_APPLICABLE | TEST_P(SslSocketTest, FailedClientCertificateHashVerificationNoClientCertificate) {
const std::string client_ctx_yaml = R"EOF(
common_tls_context:
)EOF";
const std::string server_ctx_yaml = absl::StrCat(R"EOF(
common_tls_context:
tls_certificates:
certificate_chain:
filename: "{{ test_run... | 0 |
Chrome | c7e50b5ef454efd6ab9527d795442c213eeb6afa | NOT_APPLICABLE | NOT_APPLICABLE | bool PopupContainer::handleKeyEvent(const PlatformKeyboardEvent& event)
{
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
return m_listBox->handleKeyEvent(event);
}
| 0 |
winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | NOT_APPLICABLE | NOT_APPLICABLE | UnicodeString __fastcall TCommandSet::GetCommands(TFSCommand Cmd)
{
CHECK_CMD;
return CommandSet[Cmd].Command;
}
| 0 |
glib | d553d92d6e9f53cbe5a34166fcb919ba652c6a8e | NOT_APPLICABLE | NOT_APPLICABLE | g_socket_client_connect_to_service (GSocketClient *client,
const gchar *domain,
const gchar *service,
GCancellable *cancellable,
GError **error)
{
GSocketConnectable *connectable;
GSocketConnection *connection;
connectable = g_network_service_new (service, "tcp", d... | 0 |
linux | ae7b4e1f213aa659aedf9c6ecad0bf5f0476e1e2 | NOT_APPLICABLE | NOT_APPLICABLE | static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
{
struct net *net = sock_net(skb->sk);
unsigned int h, s_h;
unsigned int e = 0, s_e;
struct rt6_rtnl_dump_arg arg;
struct fib6_walker_t *w;
struct fib6_table *tb;
struct hlist_head *head;
int res = 0;
s_h = cb->args[0];
s_e = cb->arg... | 0 |
linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | NOT_APPLICABLE | NOT_APPLICABLE | static int cifs_writepage(struct page *page, struct writeback_control *wbc)
{
int rc = cifs_writepage_locked(page, wbc);
unlock_page(page);
return rc;
}
| 0 |
libmodbus | 5ccdf5ef79d742640355d1132fa9e2abc7fbaefc | NOT_APPLICABLE | NOT_APPLICABLE | int modbus_set_slave(modbus_t *ctx, int slave)
{
if (ctx == NULL) {
errno = EINVAL;
return -1;
}
return ctx->backend->set_slave(ctx, slave);
}
| 0 |
openssl | 34628967f1e65dc8f34e000f0f5518e21afbfc7b | NOT_APPLICABLE | NOT_APPLICABLE | int tls1_final_finish_mac(SSL *s,
const char *str, int slen, unsigned char *out)
{
unsigned int i;
EVP_MD_CTX ctx;
unsigned char buf[2*EVP_MAX_MD_SIZE];
unsigned char *q,buf2[12];
int idx;
long mask;
int err=0;
const EVP_MD *md;
q=buf;
if (s->s3->handshake_buffer)
if (!ssl3_digest_cached_records(... | 0 |
linux | c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae | NOT_APPLICABLE | NOT_APPLICABLE | void fuse_request_free(struct fuse_req *req)
{
kmem_cache_free(fuse_req_cachep, req);
}
| 0 |
cpio | dd96882877721703e19272fe25034560b794061b | NOT_APPLICABLE | NOT_APPLICABLE | process_copy_pass (void)
{
dynamic_string input_name = DYNAMIC_STRING_INITIALIZER;
/* Name of file from stdin. */
dynamic_string output_name = DYNAMIC_STRING_INITIALIZER;
/* Name of new file. */
size_t dirname_len; /* Length of `directory_name'. ... | 0 |
tcpdump | 29e5470e6ab84badbc31f4532bb7554a796d9d52 | NOT_APPLICABLE | NOT_APPLICABLE | cmu_print(netdissect_options *ndo,
register const u_char *bp)
{
register const struct cmu_vend *cmu;
#define PRINTCMUADDR(m, s) { ND_TCHECK(cmu->m); \
if (cmu->m.s_addr != 0) \
ND_PRINT((ndo, " %s:%s", s, ipaddr_string(ndo, &cmu->m.s_addr))); }
ND_PRINT((ndo, " vend-cmu"));
cmu = (const struct cmu_vend *)b... | 0 |
Chrome | 5788690fb1395dc672ff9b3385dbfb1180ed710a | NOT_APPLICABLE | NOT_APPLICABLE | void DelegatedFrameHost::DidNotProduceFrame(const viz::BeginFrameAck& ack) {
DCHECK(!ack.has_damage);
support_->DidNotProduceFrame(ack);
}
| 0 |
Android | a30d7d90c4f718e46fb41a99b3d52800e1011b73 | NOT_APPLICABLE | NOT_APPLICABLE | virtual void setConsumerName(const String8& name) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
data.writeString8(name);
remote()->transact(SET_CONSUMER_NAME, data, &reply);
}
| 0 |
Android | e68cbc3e9e66df4231e70efa3e9c41abc12aea20 | NOT_APPLICABLE | NOT_APPLICABLE | status_t unflatten_binder(const sp<ProcessState>& proc,
const Parcel& in, wp<IBinder>* out)
{
const flat_binder_object* flat = in.readObject(false);
if (flat) {
switch (flat->type) {
case BINDER_TYPE_BINDER:
*out = reinterpret_cast<IBinder*>(flat->cookie);
return finish_unflatten_binder(NULL, *flat, in);
case ... | 0 |
Chrome | ad103a1564365c95f4ee4f10261f9604f91f686a | NOT_APPLICABLE | NOT_APPLICABLE | PP_Resource PPB_ImageData_Impl::CreatePlatform(PP_Instance instance,
PP_ImageDataFormat format,
const PP_Size& size,
PP_Bool init_to_zero) {
scoped_refptr<PPB_ImageData_Impl>
... | 0 |
Chrome | ef97ce340c462d5212336f09bf8075d1cb10faa4 | NOT_APPLICABLE | NOT_APPLICABLE | bool PluginInfoMessageFilter::OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) {
IPC_BEGIN_MESSAGE_MAP_EX(PluginInfoMessageFilter, message, *message_was_ok)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ChromeViewHostMsg_GetPluginInfo,
... | 0 |
linux | d88d05a9e0b6d9356e97129d4ff9942d765f46ea | NOT_APPLICABLE | NOT_APPLICABLE | void intel_pmu_pebs_sched_task(struct perf_event_context *ctx, bool sched_in)
{
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
if (!sched_in && pebs_needs_sched_cb(cpuc))
intel_pmu_drain_pebs_buffer();
} | 0 |
php | 88412772d295ebf7dd34409534507dc9bcac726e | NOT_APPLICABLE | NOT_APPLICABLE | XMLRPC_VALUE_TYPE XMLRPC_GetValueType(XMLRPC_VALUE value) {
return value ? value->type : xmlrpc_empty;
}
| 0 |
FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | NOT_APPLICABLE | NOT_APPLICABLE | static UINT drive_process_irp(DRIVE_DEVICE* drive, IRP* irp)
{
UINT error;
if (!drive || !irp)
return ERROR_INVALID_PARAMETER;
irp->IoStatus = STATUS_SUCCESS;
switch (irp->MajorFunction)
{
case IRP_MJ_CREATE:
error = drive_process_irp_create(drive, irp);
break;
case IRP_MJ_CLOSE:
error = drive_p... | 0 |
linux | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | NOT_APPLICABLE | NOT_APPLICABLE | static void devinet_copy_dflt_conf(struct net *net, int i)
{
struct net_device *dev;
rcu_read_lock();
for_each_netdev_rcu(net, dev) {
struct in_device *in_dev;
in_dev = __in_dev_get_rcu(dev);
if (in_dev && !test_bit(i, in_dev->cnf.state))
in_dev->cnf.data[i] = net->ipv4.devconf_dflt->data[i];
}
rcu_read... | 0 |
php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba?w=1 | CVE-2016-5770 | CWE-190 | static void spl_filesystem_tree_it_move_forward(zend_object_iterator *iter TSRMLS_DC)
{
spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter;
spl_filesystem_object *object = spl_filesystem_iterator_to_object(iterator);
object->u.dir.index++;
do {
spl_filesystem_dir_read(object TSRMLS_CC);... | 1 |
server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | NOT_APPLICABLE | NOT_APPLICABLE | copy_fields(TMP_TABLE_PARAM *param)
{
Copy_field *ptr=param->copy_field;
Copy_field *end=param->copy_field_end;
DBUG_ASSERT((ptr != NULL && end >= ptr) || (ptr == NULL && end == NULL));
for (; ptr != end; ptr++)
(*ptr->do_copy)(ptr);
List_iterator_fast<Item> it(param->copy_funcs);
Item_copy *item;
... | 0 |
linux-nfs | 1c77f7a869bdea2a34799d774460d1f9983d45f0 | NOT_APPLICABLE | NOT_APPLICABLE | __rpc_get_local_uid(SVCXPRT *transp, uid_t *uid) {
int sock, ret;
gid_t egid;
uid_t euid;
struct sockaddr *sa;
sock = transp->xp_fd;
sa = (struct sockaddr *)transp->xp_rtaddr.buf;
if (sa->sa_family == AF_LOCAL) {
ret = getpeereid(sock, &euid, &egid);
if (ret == 0)
*uid = euid;
return (ret);
} else
r... | 0 |
Chrome | b399a05453d7b3e2dfdec67865fefe6953bcc59e | NOT_APPLICABLE | NOT_APPLICABLE | void RenderWidgetHostViewAura::RemovingFromRootWindow() {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(window_->GetRootWindow());
if (cursor_client)
cursor_client->RemoveObserver(this);
DetachFromInputMethod();
window_->GetHost()->RemoveObserver(this);
if (delegated_fr... | 0 |
cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | NOT_APPLICABLE | NOT_APPLICABLE | const std::string& QueryParams::param(const std::string& name, size_type n) const
{
for (size_type nn = 0; nn < _values.size(); ++nn)
{
if (_values[nn].name == name)
{
if (n == 0)
return _values[nn].value;
--n;
}
}
static std::string emptyValue;
return emptyValue;
} | 0 |
Android | a24543157ae2cdd25da43e20f4e48a07481e6ceb | CVE-2018-9490 | CWE-704 | static Maybe<bool> CollectValuesOrEntriesImpl(
Isolate* isolate, Handle<JSObject> object,
Handle<FixedArray> values_or_entries, bool get_entries, int* nof_items,
PropertyFilter filter) {
int count = 0;
KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly,
... | 1 |
gpac | 35ab4475a7df9b2a4bcab235e379c0c3ec543658 | NOT_APPLICABLE | NOT_APPLICABLE | static void gf_sm_delete_stream(GF_StreamContext *sc)
{
gf_sm_reset_stream(sc);
gf_list_del(sc->AUs);
if (sc->name) gf_free(sc->name);
if (sc->dec_cfg) gf_free(sc->dec_cfg);
gf_free(sc);
}
| 0 |
Android | d07f5c14e811951ff9b411ceb84e7288e0d04aaf | NOT_APPLICABLE | NOT_APPLICABLE | sp<MetaData> OggSource::getFormat() {
return mExtractor->mImpl->getFormat();
}
| 0 |
LuaJIT | e296f56b825c688c3530a981dc6b495d972f3d01 | NOT_APPLICABLE | NOT_APPLICABLE | int lj_trace_flushall(lua_State *L)
{
jit_State *J = L2J(L);
ptrdiff_t i;
if ((J2G(J)->hookmask & HOOK_GC))
return 1;
for (i = (ptrdiff_t)J->sizetrace-1; i > 0; i--) {
GCtrace *T = traceref(J, i);
if (T) {
if (T->root == 0)
trace_flushroot(J, T);
lj_gdbjit_deltrace(J, T);
T->trace... | 0 |
Chrome | 2f81d000fdb5331121cba7ff81dfaaec25b520a5 | CVE-2019-5822 | CWE-284 | bool DownloadManagerImpl::InterceptDownload(
const download::DownloadCreateInfo& info) {
WebContents* web_contents = WebContentsImpl::FromRenderFrameHostID(
info.render_process_id, info.render_frame_id);
if (info.is_new_download &&
info.result ==
download::DOWNLOAD_INTERRUPT_REASON_SERVER_... | 1 |
linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | NOT_APPLICABLE | NOT_APPLICABLE | static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
{
u32 exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
register void *__sp asm(_ASM_SP);
if ((exit_intr_info & (INTR_INFO_VALID_MASK | INTR_INFO_INTR_TYPE_MASK))
== (INTR_INFO_VALID_MASK | INTR_TYPE_EXT_INTR)) {
unsigned int vector;
unsigned long en... | 0 |
openvpn | 1394192b210cb3c6624a7419bcf3ff966742e79b | NOT_APPLICABLE | NOT_APPLICABLE | RegisterDNS(LPVOID unused)
{
DWORD err;
DWORD i;
WCHAR sys_path[MAX_PATH];
DWORD timeout = RDNS_TIMEOUT * 1000; /* in milliseconds */
/* default path of ipconfig command */
WCHAR ipcfg[MAX_PATH] = L"C:\\Windows\\system32\\ipconfig.exe";
struct
{
WCHAR *argv0;
WCHAR *cmd... | 0 |
xdelta-devel | ef93ff74203e030073b898c05e8b4860b5d09ef2 | NOT_APPLICABLE | NOT_APPLICABLE | main_file_read (main_file *ifile,
uint8_t *buf,
size_t size,
size_t *nread,
const char *msg)
{
int ret = 0;
#if XD3_STDIO
size_t result;
result = fread (buf, 1, size, ifile->file);
if (result < size && ferror (ifile->file))
{
ret = get_errno ();
}
else
{
*nread ... | 0 |
qemu | 26f670a244982335cc08943fb1ec099a2c81e42d | NOT_APPLICABLE | NOT_APPLICABLE | static void ohci_detach(USBPort *port1)
{
OHCIState *s = port1->opaque;
OHCIPort *port = &s->rhport[port1->index];
uint32_t old_state = port->ctrl;
ohci_async_cancel_device(s, port1->dev);
/* set connect status */
if (port->ctrl & OHCI_PORT_CCS) {
port->ctrl &= ~OHCI_PORT_CCS;
... | 0 |
Chrome | e99cc8e5a48ff4978d401c48a64f06649f647f3f | NOT_APPLICABLE | NOT_APPLICABLE | void TextTrackLoader::newRegionsParsed()
{
m_client->newRegionsAvailable(this);
}
| 0 |
linux | d6d86830705f173fca6087a3e67ceaf68db80523 | NOT_APPLICABLE | NOT_APPLICABLE | static bool tsk_conn_cong(struct tipc_sock *tsk)
{
return tsk->snt_unacked > tsk->snd_win;
} | 0 |
php-src | 58006537fc5f133ae8549efe5118cde418b3ace9 | NOT_APPLICABLE | NOT_APPLICABLE | static void
MYSQLND_METHOD(mysqlnd_protocol, init_change_auth_response_packet)(struct st_mysqlnd_packet_change_auth_response *packet)
{
DBG_ENTER("mysqlnd_protocol::init_change_auth_response_packet");
memset(packet, 0, sizeof(*packet));
packet->header.m = &packet_methods[PROT_CHANGE_AUTH_RESP_PACKET];
DBG_VOID_RETU... | 0 |
php | b061fa909de77085d3822a89ab901b934d0362c4 | NOT_APPLICABLE | NOT_APPLICABLE | PHP_FUNCTION(get_headers)
{
char *url;
int url_len;
php_stream_context *context;
php_stream *stream;
zval **prev_val, **hdr = NULL, **h;
HashPosition pos;
HashTable *hashT;
long format = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &url, &url_len, &format) == FAILURE) {
return;
}
context... | 0 |
pacemaker | 5ec24a2642bd0854b884d1a9b51d12371373b410 | CVE-2016-7797 | CWE-254 | lrmd_remote_listen(gpointer data)
{
int csock = 0;
int flag = 0;
unsigned laddr = 0;
struct sockaddr addr;
gnutls_session_t *session = NULL;
crm_client_t *new_client = NULL;
static struct mainloop_fd_callbacks lrmd_remote_fd_cb = {
.dispatch = lrmd_remote_client_msg,
.destro... | 1 |
Chrome | e89cfcb9090e8c98129ae9160c513f504db74599 | CVE-2012-5148 | CWE-20 | void Browser::TabDetachedAtImpl(TabContents* contents, int index,
DetachType type) {
if (type == DETACH_TYPE_DETACH) {
if (contents == chrome::GetActiveTabContents(this)) {
LocationBar* location_bar = window()->GetLocationBar();
if (location_bar)
location_ba... | 1 |
pango | 4de30e5500eaeb49f4bf0b7a07f718e149a2ed5e | NOT_APPLICABLE | NOT_APPLICABLE | pango_glyph_string_new (void)
{
PangoGlyphString *string = g_slice_new (PangoGlyphString);
string->num_glyphs = 0;
string->space = 0;
string->glyphs = NULL;
string->log_clusters = NULL;
return string;
}
| 0 |
php | 6aeee47b2cd47915ccfa3b41433a3f57aea24dd5 | NOT_APPLICABLE | NOT_APPLICABLE | PHP_FUNCTION(strrpos)
{
zval *zneedle;
char *needle;
zend_string *haystack;
size_t needle_len;
zend_long offset = 0;
char *p, *e, ord_needle[2];
char *found;
#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &haystack, &zneedle, &offset) == FAILURE) {
RETURN_FALSE;
}
#else
ZEND_PARSE_PARA... | 0 |
poppler | e853106b58d6b4b0467dbd6436c9bb1cfbd372cf | NOT_APPLICABLE | NOT_APPLICABLE | void Gfx::pushStateGuard() {
stateGuards.push_back(stackHeight);
}
| 0 |
FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | NOT_APPLICABLE | NOT_APPLICABLE | static int pix_norm1_c(uint8_t * pix, int line_size)
{
int s, i, j;
uint32_t *sq = ff_squareTbl + 256;
s = 0;
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j += 8) {
#if 0
s += sq[pix[0]];
s += sq[pix[1]];
s += sq[pix[2]];
s += sq[pix[3]];
... | 0 |
linux | 0305cd5f7fca85dae392b9ba85b116896eb7c1c7 | NOT_APPLICABLE | NOT_APPLICABLE | static void btrfs_retry_endio(struct bio *bio)
{
struct btrfs_retry_complete *done = bio->bi_private;
struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
struct bio_vec *bvec;
int uptodate;
int ret;
int i;
if (bio->bi_error)
goto end;
uptodate = 1;
bio_for_each_segment_all(bvec, bio, i) {
ret = __readpage_e... | 0 |
cinnamon-screensaver | da7af55f1fa966c52e15cc288d4f8928eca8cc9f | NOT_APPLICABLE | NOT_APPLICABLE | gs_window_real_get_preferred_height (GtkWidget *widget,
gint *minimal_height,
gint *natural_height)
{
GtkRequisition requisition;
gs_window_real_size_request (widget, &requisition);
*minimal_height = *natural_height = re... | 0 |
Pillow | 3fee28eb9479bf7d59e0fa08068f9cc4a6e2f04c | NOT_APPLICABLE | NOT_APPLICABLE | _tiffNullMapProc(thandle_t hdata, tdata_t *pbase, toff_t *psize) {
(void)hdata;
(void)pbase;
(void)psize;
return (0);
} | 0 |
libx11 | 8d2e02ae650f00c4a53deb625211a0527126c605 | NOT_APPLICABLE | NOT_APPLICABLE | XSetWMHints (
Display *dpy,
Window w,
XWMHints *wmhints)
{
xPropWMHints prop;
memset(&prop, 0, sizeof(prop));
prop.flags = wmhints->flags;
if (wmhints->flags & InputHint)
prop.input = (wmhints->input == True ? 1 : 0);
if (wmhints->flags & StateHint)
prop.initialState = wmhints->initial_state;
if (wmh... | 0 |
Chrome | fff450abc4e2fb330ba700547a8e6a7b0fb90a6e | NOT_APPLICABLE | NOT_APPLICABLE | void OutOfProcessInstance::SearchString(const base::char16* string,
const base::char16* term,
bool case_sensitive,
std::vector<SearchStringResult>* results) {
PP_PrivateFindResult* pp_results;
int count = 0;
pp::PDF::SearchString(... | 0 |
mysql-wsrep | 4ea4b0c6a318209ac09b15aaa906c7b4a13b988c | NOT_APPLICABLE | NOT_APPLICABLE | bool wsrep_before_SE()
{
return (wsrep_provider != NULL
&& strcmp (wsrep_provider, WSREP_NONE)
&& strcmp (wsrep_sst_method, WSREP_SST_SKIP)
&& strcmp (wsrep_sst_method, WSREP_SST_MYSQLDUMP));
} | 0 |
ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | NOT_APPLICABLE | NOT_APPLICABLE | str_strlen(VALUE str, rb_encoding *enc)
{
const char *p, *e;
long n;
int cr;
if (single_byte_optimizable(str)) return RSTRING_LEN(str);
if (!enc) enc = STR_ENC_GET(str);
p = RSTRING_PTR(str);
e = RSTRING_END(str);
cr = ENC_CODERANGE(str);
#ifdef NONASCII_MASK
if (ENC_CODERANGE(str) ... | 0 |
jdk11u | 132745902a4601dc64b2c8ca112ca30292feccb4 | NOT_APPLICABLE | NOT_APPLICABLE | void CallInfo::set_handle(const methodHandle& resolved_method,
Handle resolved_appendix,
Handle resolved_method_type, TRAPS) {
set_handle(SystemDictionary::MethodHandle_klass(), resolved_method, resolved_appendix, resolved_method_type, CHECK);
} | 0 |
openssl | fb8d9ddb9dc19d84dffa84932f75e607c8a3ffe6 | CVE-2014-0224 | CWE-326 | int ssl3_get_server_hello(SSL *s)
{
STACK_OF(SSL_CIPHER) *sk;
const SSL_CIPHER *c;
CERT *ct = s->cert;
unsigned char *p,*d;
int i,al=SSL_AD_INTERNAL_ERROR,ok;
unsigned int j;
long n;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp;
#endif
/* Hello verify request and/or server hello version may not
* match so set fir... | 1 |
mbedtls | 298a43a77ec0ed2c19a8c924ddd8571ef3e65dfd | NOT_APPLICABLE | NOT_APPLICABLE | void mbedtls_ecp_point_free( mbedtls_ecp_point *pt )
{
if( pt == NULL )
return;
mbedtls_mpi_free( &( pt->X ) );
mbedtls_mpi_free( &( pt->Y ) );
mbedtls_mpi_free( &( pt->Z ) );
}
| 0 |
Chrome | eb4d5d9ab41449b79fcf6f84d8983be2b12bd490 | NOT_APPLICABLE | NOT_APPLICABLE | void ContainerNode::focusStateChanged()
{
if (!layoutObject())
return;
if (styleChangeType() < SubtreeStyleChange) {
if (computedStyle()->affectedByFocus() && computedStyle()->hasPseudoStyle(FIRST_LETTER))
setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createWi... | 0 |
savannah | 8b281f83e8516535756f92dbf90940ac44bd45e1 | NOT_APPLICABLE | NOT_APPLICABLE | cid_load_keyword( CID_Face face,
CID_Loader* loader,
const T1_Field keyword )
{
FT_Error error;
CID_Parser* parser = &loader->parser;
FT_Byte* object;
void* dummy_object;
CID_FaceInfo cid = &face->cid;
/* if the keywo... | 0 |
linux | af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1 | NOT_APPLICABLE | NOT_APPLICABLE | static int shash_update_unaligned(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
struct crypto_shash *tfm = desc->tfm;
struct shash_alg *shash = crypto_shash_alg(tfm);
unsigned long alignmask = crypto_shash_alignmask(tfm);
unsigned int unaligned_len = alignmask + 1 -
((unsigned long)dat... | 0 |
qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | NOT_APPLICABLE | NOT_APPLICABLE | static uint16_t tsc2102_data_register_read(TSC210xState *s, int reg)
{
switch (reg) {
case 0x00: /* X */
s->dav &= 0xfbff;
return TSC_CUT_RESOLUTION(X_TRANSFORM(s), s->precision) +
(s->noise & 3);
case 0x01: /* Y */
s->noise ++;
s->dav &= 0xfdff;
retu... | 0 |
cracklib | 33d7fa4585247cd2247a1ffa032ad245836c6edb | NOT_APPLICABLE | NOT_APPLICABLE | Debug(val, a, b, c, d, e, f, g)
int val;
char *a, *b, *c, *d, *e, *f, *g;
{
fprintf(stderr, a, b, c, d, e, f, g);
} | 0 |
mysql-server | 5ac61b2af0cf37eeed5050a91819d6d273f037a5 | NOT_APPLICABLE | NOT_APPLICABLE | get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
case OPT_CHARSETS_DIR:
strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
charsets_dir = mysql_charsets_dir;
break;
case OPT_DELIMITER:
if (argument == disab... | 0 |
scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | NOT_APPLICABLE | NOT_APPLICABLE | void cql_server::connection::write_response(foreign_ptr<std::unique_ptr<cql_server::response>>&& response, service_permit permit, cql_compression compression)
{
_ready_to_respond = _ready_to_respond.then([this, compression, response = std::move(response), permit = std::move(permit)] () mutable {
auto messag... | 0 |
php-src | 996faf964bba1aec06b153b370a7f20d3dd2bb8b?w=1 | NOT_APPLICABLE | NOT_APPLICABLE | static int sapi_extract_response_code(const char *header_line)
{
int code = 200;
const char *ptr;
for (ptr = header_line; *ptr; ptr++) {
if (*ptr == ' ' && *(ptr + 1) != ' ') {
code = atoi(ptr + 1);
break;
}
}
return code;
}
| 0 |
Chrome | 957973753ec4159003ff7930d946b7e89c7e09f3 | NOT_APPLICABLE | NOT_APPLICABLE | void BlobURLRequestJob::SetExtraRequestHeaders(
const net::HttpRequestHeaders& headers) {
std::string range_header;
if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) {
std::vector<net::HttpByteRange> ranges;
if (net::HttpUtil::ParseRangeHeader(range_header, &ranges)) {
if (ran... | 0 |
haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | NOT_APPLICABLE | NOT_APPLICABLE | static inline void htx_reset(struct htx *htx)
{
htx->tail = htx->head = htx->first = -1;
htx->data = 0;
htx->tail_addr = htx->head_addr = htx->end_addr = 0;
htx->extra = 0;
htx->flags = HTX_FL_NONE;
} | 0 |
linux | 1ee0a224bc9aad1de496c795f96bc6ba2c394811 | NOT_APPLICABLE | NOT_APPLICABLE | static void edge_close(struct usb_serial_port *port)
{
struct edgeport_serial *edge_serial;
struct edgeport_port *edge_port;
struct usb_serial *serial = port->serial;
int port_number;
edge_serial = usb_get_serial_data(port->serial);
edge_port = usb_get_serial_port_data(port);
if (edge_serial == NULL || edge_por... | 0 |
linux | 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8 | NOT_APPLICABLE | NOT_APPLICABLE | pfn_t gfn_to_pfn_memslot(struct kvm_memory_slot *slot, gfn_t gfn)
{
return __gfn_to_pfn_memslot(slot, gfn, false, NULL, true, NULL);
}
| 0 |
FFmpeg | 821a5938d100458f4d09d634041b05c860554ce0 | CVE-2013-7013 | CWE-189 | static int g2m_init_buffers(G2MContext *c)
{
int aligned_height;
if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) {
c->framebuf_stride = FFALIGN(c->width * 3, 16);
aligned_height = FFALIGN(c->height, 16);
av_free(c->framebuf);
c->framebuf = av_mal... | 1 |
php-src | 4605d536d23b00813d11cc906bb48d39bdcf5f25 | NOT_APPLICABLE | NOT_APPLICABLE | static int multipart_buffer_eof(multipart_buffer *self TSRMLS_DC)
{
if ( (self->bytes_in_buffer == 0 && fill_buffer(self TSRMLS_CC) < 1) ) {
return 1;
} else {
return 0;
}
} | 0 |
Chrome | 6b96dd532af164a73f2aac757bafff58211aca2c | NOT_APPLICABLE | NOT_APPLICABLE | ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle(
JNIEnv* env, jobject obj) const {
return base::android::ConvertUTF16ToJavaString(env,
web_contents_->GetTitle());
}
| 0 |
Chrome | 5925dff83699508b5e2735afb0297dfb310e159d | NOT_APPLICABLE | NOT_APPLICABLE | bool Browser::TakeFocus(bool reverse) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
Source<Browser>(this),
NotificationService::NoDetails());
return false;
}
| 0 |
linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | NOT_APPLICABLE | NOT_APPLICABLE | asmlinkage long compat_sys_utime(char __user *filename, struct compat_utimbuf __user *t)
{
struct timeval tv[2];
if (t) {
if (get_user(tv[0].tv_sec, &t->actime) ||
get_user(tv[1].tv_sec, &t->modtime))
return -EFAULT;
tv[0].tv_usec = 0;
tv[1].tv_usec = 0;
}
return do_utimes(AT_FDCWD, filename, t ? tv... | 0 |
linux | 999653786df6954a31044528ac3f7a5dadca08f4 | NOT_APPLICABLE | NOT_APPLICABLE | static inline void allow_bits(struct posix_ace_state *astate, u32 mask)
{
/* Allow all bits in the mask not already denied: */
astate->allow |= mask & ~astate->deny;
}
| 0 |
nanopb | aa9d0d1ca78d6adec3adfeecf3a706c7f9df81f2 | NOT_APPLICABLE | NOT_APPLICABLE | static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *iter)
{
pb_callback_t *pCallback = (pb_callback_t*)iter->pData;
#ifdef PB_OLD_CALLBACK_STYLE
void *arg;
#else
void **arg;
#endif
if (pCallback == NULL || pCallback->funcs.decode == NULL)
... | 0 |
ovs | 0befd1f3745055c32940f5faf9559be6a14395e6 | NOT_APPLICABLE | NOT_APPLICABLE | handle_port_desc_stats_request(struct ofconn *ofconn,
const struct ofp_header *request)
{
ofp_port_t port_no;
enum ofperr error;
error = ofputil_decode_port_desc_stats_request(request, &port_no);
if (!error) {
handle_port_request(ofconn, request, port_no, append_p... | 0 |
linux | 51ebd3181572af8d5076808dab2682d800f6da5d | NOT_APPLICABLE | NOT_APPLICABLE | static struct rt6_info *ip6_pol_route_lookup(struct net *net,
struct fib6_table *table,
struct flowi6 *fl6, int flags)
{
struct fib6_node *fn;
struct rt6_info *rt;
read_lock_bh(&table->tb6_lock);
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
restart:
rt = fn->leaf;
rt = rt6_de... | 0 |
Chrome | e21bdfb9c758ac411012ad84f83d26d3f7dd69fb | NOT_APPLICABLE | NOT_APPLICABLE | EventRouter* TestExtensionSystem::event_router() {
return NULL;
}
| 0 |
linux | c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae | NOT_APPLICABLE | NOT_APPLICABLE | static int request_pending(struct fuse_conn *fc)
{
return !list_empty(&fc->pending) || !list_empty(&fc->interrupts) ||
forget_pending(fc);
}
| 0 |
ceph | be7679007c3dfab3e19c22c38c36ccac91828e3b | CVE-2020-1760 | CWE-79 | int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs,
off_t bl_len)
{
const char *content_type = NULL;
string content_type_str;
map<string, string> response_attrs;
map<string, string>::iterator riter;
bufferlist metadata_bl;
string expires = get_s3_expiration_header(s, last... | 1 |
openjpeg | baf0c1ad4572daa89caa3b12985bdd93530f0dd7 | NOT_APPLICABLE | NOT_APPLICABLE | static void bmp24toimage(const OPJ_UINT8* pData, OPJ_UINT32 stride,
opj_image_t* image)
{
int index;
OPJ_UINT32 width, height;
OPJ_UINT32 x, y;
const OPJ_UINT8 *pSrc = NULL;
width = image->comps[0].w;
height = image->comps[0].h;
index = 0;
pSrc = pData + (heig... | 0 |
linux | 4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a | NOT_APPLICABLE | NOT_APPLICABLE | static int validate_params(uint cmd, struct dm_ioctl *param)
{
/* Always clear this flag */
param->flags &= ~DM_BUFFER_FULL_FLAG;
param->flags &= ~DM_UEVENT_GENERATED_FLAG;
param->flags &= ~DM_SECURE_DATA_FLAG;
param->flags &= ~DM_DATA_OUT_FLAG;
/* Ignores parameters */
if (cmd == DM_REMOVE_ALL_CMD ||
cmd ... | 0 |
core | 8b716828c4a4ba11f2189ce002b80bf62a74538e | CVE-2021-29157 | CWE-22 | static const char *escape_identifier(const char *identifier)
{
size_t pos = strcspn(identifier, "./%");
if (pos < strlen(identifier)) {
/* sanitize identifier, cannot allow dots or / in it, so we
encode them */
string_t *new_id = t_str_new(strlen(identifier));
/* put initial data */
str_append_data(new_id... | 1 |
linux | 5233252fce714053f0151680933571a2da9cbfb4 | NOT_APPLICABLE | NOT_APPLICABLE | static int sco_sock_accept(struct socket *sock, struct socket *newsock,
int flags)
{
DEFINE_WAIT_FUNC(wait, woken_wake_function);
struct sock *sk = sock->sk, *ch;
long timeo;
int err = 0;
lock_sock(sk);
timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
BT_DBG("sk %p timeo %ld", sk, timeo);
/* Wait for an... | 0 |
ImageMagick6 | ae3eecad2f59e27123c1a6c891be75d06fc03656 | NOT_APPLICABLE | NOT_APPLICABLE | static Image *ReadMIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
#define BZipMaxExtent(x) ((x)+((x)/100)+600)
#define LZMAMaxExtent(x) ((x)+((x)/3)+128)
#define ThrowMIFFException(exception,message) \
{ \
if (quantum_info != (QuantumInfo *) NULL) \
quantum_info=DestroyQuantumInfo(quantum_i... | 0 |