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: void SessionService::SetTabExtensionAppID(
const SessionID& window_id,
const SessionID& tab_id,
const std::string& extension_app_id) {
if (!ShouldTrackChangesToWindow(window_id))
return;
ScheduleCommand(CreateSetTabExtensionAppIDCommand(
kCommandSetExtensionAppID,
... | 0 | 108,839 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false;
Send(new PrintHostMsg_IsPrintingEnabled(routing_id(), &result));
return result;
}
Commit Message: Crash on nested IPC handlers in PrintWebViewHelper
Class is not designed to handle nested IPC. Regular flows also does not
expect them. Stil... | 0 | 126,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: static MagickBooleanType ReadOneLayer(const ImageInfo *image_info,Image* image,
XCFDocInfo* inDocInfo,XCFLayerInfo *outLayer,const ssize_t layer,
ExceptionInfo *exception)
{
MagickOffsetType
offset;
unsigned int
foundPropEnd = 0;
size_t
hierarchy_offset,
layer_mask_offset;
/* clear ... | 0 | 73,588 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Layer::SetAnchorPointZ(float anchor_point_z) {
DCHECK(IsPropertyChangeAllowed());
if (anchor_point_z_ == anchor_point_z)
return;
anchor_point_z_ = anchor_point_z;
SetNeedsCommit();
}
Commit Message: Removed pinch viewport scroll offset distribution
The associated change in Blink makes the pinch... | 0 | 111,894 |
Analyze the following 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 unsigned short snd_seq_file_flags(struct file *file)
{
switch (file->f_mode & (FMODE_READ | FMODE_WRITE)) {
case FMODE_WRITE:
return SNDRV_SEQ_LFLG_OUTPUT;
case FMODE_READ:
return SNDRV_SEQ_LFLG_INPUT;
default:
return SN... | 0 | 54,691 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int32_t result() const { return result_; }
Commit Message: Fix PPB_Flash_MessageLoop.
This CL suspends script callbacks and resource loads while running nested message loop using PPB_Flash_MessageLoop.
BUG=569496
Review URL: https://codereview.chromium.org/1559113002
Cr-Commit-Position: refs/heads/master@{... | 0 | 131,084 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline void kvmppc_set_vsr_word(struct kvm_vcpu *vcpu,
u32 gpr32)
{
union kvmppc_one_reg val;
int offset = kvmppc_get_vsr_word_offset(vcpu->arch.mmio_vsx_offset);
int index = vcpu->arch.io_gpr & KVM_MMIO_REG_MASK;
int dword_offset, word_offset;
if (offset == -1)
return;
if (vcpu->arch.mmio_vsx_t... | 0 | 60,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: HeadlessPrintManager::HeadlessPrintManager(content::WebContents* web_contents)
: PrintManager(web_contents) {
Reset();
}
Commit Message: DevTools: allow styling the page number element when printing over the protocol.
Bug: none
Change-Id: I13e6afbd86a7c6bcdedbf0645183194b9de7cfb4
Reviewed-on: https://chro... | 0 | 149,825 |
Analyze the following 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 ChromeMetricsServiceClient::CollectFinalHistograms() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!waiting_for_collect_final_metrics_step_);
waiting_for_collect_final_metrics_step_ = true;
base::Closure callback =
base::Bind(&ChromeMetricsServiceClient::OnMemoryDetailCollectio... | 0 | 130,406 |
Analyze the following 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 path_count_init(void)
{
int i;
for (i = 0; i < PATH_ARR_SIZE; i++)
path_count[i] = 0;
}
Commit Message: epoll: clear the tfile_check_list on -ELOOP
An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent
circular epoll dependencies from being created. However, in that case we
d... | 0 | 19,594 |
Analyze the following 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 Automation::GetCookies(const std::string& url,
ListValue** cookies,
Error** error) {
std::string error_msg;
if (!SendGetCookiesJSONRequest(automation(), url, cookies, &error_msg))
*error = new Error(kUnknownError, error_msg);
}
Commit Message: ... | 0 | 100,705 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScopedMessagePipeHandle Core::ExtractMessagePipeFromInvitation(
const std::string& name) {
RequestContext request_context;
ports::PortRef port0, port1;
GetNodeController()->node()->CreatePortPair(&port0, &port1);
MojoHandle handle = AddDispatcher(new MessagePipeDispatcher(
GetNodeController(), p... | 0 | 149,593 |
Analyze the following 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 base::FilePath& DriveFsHost::GetMountPath() const {
DCHECK(IsMounted());
return mount_state_->mount_path();
}
Commit Message: Add a fake DriveFS launcher client.
Using DriveFS requires building and deploying ChromeOS. Add a client for
the fake DriveFS launcher to allow the use of a real DriveFS from a... | 0 | 124,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: int PDFiumEngine::Form_GetFilePath(IPDF_JSPLATFORM* param,
void* file_path,
int length) {
PDFiumEngine* engine = static_cast<PDFiumEngine*>(param);
std::string rv = engine->client_->GetURL();
if (file_path && rv.size() <= static_cast<size... | 0 | 140,291 |
Analyze the following 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 InFlightBackendIO::DoomAllEntries(
const net::CompletionCallback& callback) {
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomAllEntries();
PostOperation(FROM_HERE, operation.get());
}
Commit Message: Blockfile cache: fix long-standing sparse + evict ree... | 0 | 147,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: GURL GetEffectiveURLForInstant(const GURL& url, Profile* profile) {
CHECK(chrome::search::ShouldAssignURLToInstantRenderer(url, profile))
<< "Error granting Instant access.";
if (url.SchemeIs(chrome::kChromeSearchScheme))
return url;
GURL effective_url(url);
url_canon::Replacements<char> repl... | 0 | 115,752 |
Analyze the following 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 page *get_read_data_page(struct inode *inode, pgoff_t index,
int op_flags, bool for_write)
{
struct address_space *mapping = inode->i_mapping;
struct dnode_of_data dn;
struct page *page;
struct extent_info ei;
int err;
struct f2fs_io_info fio = {
.sbi = F2FS_I_SB(inode),
.type = DATA,
.op... | 0 | 85,197 |
Analyze the following 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 ucvector_init_buffer(ucvector* p, unsigned char* buffer, size_t size)
{
p->data = buffer;
p->allocsize = p->size = size;
}
Commit Message: Fixed #5645: realloc return handling
CWE ID: CWE-772 | 0 | 87,602 |
Analyze the following 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 int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data)
{
struct l2cap_chan_list *list = &conn->chan_list;
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct sock *sk, *parent;
int result, status = L2CAP_CS_NO_INFO;
u16 d... | 0 | 58,934 |
Analyze the following 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 ssl3_send_certificate_request(SSL *s)
{
unsigned char *p,*d;
int i,j,nl,off,n;
STACK_OF(X509_NAME) *sk=NULL;
X509_NAME *name;
BUF_MEM *buf;
if (s->state == SSL3_ST_SW_CERT_REQ_A)
{
buf=s->init_buf;
d=p=ssl_handshake_start(s);
/* get the list of acceptable cert types */
p++;
n=ssl3_get_re... | 0 | 45,181 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: size_t strnlen16(const char16_t *s, size_t maxlen)
{
const char16_t *ss = s;
/* Important: the maxlen test must precede the reference through ss;
since the byte beyond the maximum may segfault */
while ((maxlen > 0) && *ss) {
ss++;
maxlen--;
}
return ss-s;
}
Commit Message: libutils/Unicode.cp... | 0 | 158,429 |
Analyze the following 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 cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete(cJSON_DetachItemFromArray(array,which));}
Commit Message: fix buffer overflow (#30)
CWE ID: CWE-125 | 0 | 93,707 |
Analyze the following 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 SendScrollEvents(ui::EventProcessor* dispatcher,
float x_start,
float y_start,
int dx,
int dy,
int touch_id,
int time_step,
int num_steps,
... | 0 | 112,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: atmarp_addr_print(netdissect_options *ndo,
const u_char *ha, u_int ha_len, const u_char *srca,
u_int srca_len)
{
if (ha_len == 0)
ND_PRINT((ndo, "<No address>"));
else {
ND_PRINT((ndo, "%s", linkaddr_string(ndo, ha, LINKADDR_ATM, ha_len)));
if (srca_len != 0)
ND_PRINT((ndo, ",%s",
linka... | 0 | 62,374 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: LayoutUnit RenderBox::clientHeight() const
{
return height() - borderTop() - borderBottom() - horizontalScrollbarHeight();
}
Commit Message: Source/WebCore: Fix for bug 64046 - Wrong image height in absolutely positioned div in
relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bu... | 0 | 101,540 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: u_char *_our_safe_pcap_next(pcap_t *pcap, struct pcap_pkthdr *pkthdr,
const char *funcname, const int line, const char *file)
{
u_char *pktdata = (u_char *)pcap_next(pcap, pkthdr);
if (pktdata) {
if (pkthdr->len > MAXPACKET) {
fprintf(stderr, "safe_pcap_next ERROR: Invalid pa... | 1 | 168,946 |
Analyze the following 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 ChromeDownloadManagerDelegate::OnPathReservationAvailable(
int32 download_id,
const content::DownloadTargetCallback& callback,
bool should_prompt,
content::DownloadDangerType danger_type,
const FilePath& reserved_path,
bool reserved_path_verified) {
DCHECK(BrowserThread::CurrentlyOn... | 0 | 115,088 |
Analyze the following 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 ImageResource::AllClientsAndObserversRemoved() {
CHECK(is_during_finish_as_error_ || !GetContent()->HasImage() ||
!ErrorOccurred());
if (!ThreadHeap::WillObjectBeLazilySwept(this)) {
Platform::Current()->CurrentThread()->GetWebTaskRunner()->PostTask(
FROM_HERE, WTF::Bind(&ImageResourc... | 0 | 149,640 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool AppCacheDatabase::InsertNamespace(
const NamespaceRecord* record) {
if (!LazyOpen(kCreateIfNeeded))
return false;
static const char kSql[] =
"INSERT INTO Namespaces"
" (cache_id, origin, type, namespace_url, target_url, is_pattern)"
" VALUES (?, ?, ?, ?, ?, ?)";
sql::State... | 0 | 151,292 |
Analyze the following 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(cpSeparateTiles2SeparateTiles)
{
return cpImage(in, out,
readSeparateTilesIntoBuffer,
writeBufferToSeparateTiles,
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 ... | 0 | 48,198 |
Analyze the following 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 Delete_FFMPEG_Demux(void *ifce)
{
FFDemux *ffd;
GF_InputService *ptr = (GF_InputService *)ifce;
if (!ptr)
return;
ffd = (FFDemux*)ptr->priv;
if (ffd) {
if (ffd->thread)
gf_th_del(ffd->thread);
ffd->thread = NULL;
if (ffd->mx)
gf_mx_del(ffd->mx);
#ifndef USE_PRE_0_7
if (ffd->options) av_... | 0 | 92,852 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xfs_inode_free_cowblocks(
struct xfs_inode *ip,
int flags,
void *args)
{
struct xfs_eofblocks *eofb = args;
struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
int match;
int ret = 0;
if (!xfs_prep_free_cowblocks(ip, ifp))
return 0;
if (eofb) {
if (eofb->eof_flags & XFS_EOF_FLAGS_UNION... | 0 | 79,965 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ash::wm::WindowState* ClientControlledShellSurface::GetWindowState() {
return ash::wm::GetWindowState(widget_->GetNativeWindow());
}
Commit Message: Ignore updatePipBounds before initial bounds is set
When PIP enter/exit transition happens, window state change and
initial bounds change are committed in the sa... | 0 | 137,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: error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathInstancedCHROMIUM(
uint32_t immediate_data_size,
const volatile void* cmd_data) {
static const char kFunctionName[] =
"glStencilThenCoverFillPathInstancedCHROMIUM";
const volatile gles2::cmds::StencilThenCoverFillPathInstancedCHROMIUM&... | 0 | 141,591 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void op32_set_current_rxslot(struct b43_dmaring *ring, int slot)
{
b43_dma_write(ring, B43_DMA32_RXINDEX,
(u32) (slot * sizeof(struct b43_dmadesc32)));
}
Commit Message: b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://... | 0 | 24,560 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: R_API inline int r_anal_bb_is_in_offset (RAnalBlock *bb, ut64 off) {
return (off >= bb->addr && off < bb->addr + bb->size);
}
Commit Message: Fix #10293 - Use-after-free in r_anal_bb_free()
CWE ID: CWE-416 | 0 | 82,032 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline void BLEND_OP(int I, u64 *W)
{
W[I & 15] += s1(W[(I-2) & 15]) + W[(I-7) & 15] + s0(W[(I-15) & 15]);
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a... | 0 | 47,367 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: smb_tcp_print(netdissect_options *ndo,
const u_char * data, int length)
{
int caplen;
u_int smb_len;
const u_char *maxbuf;
if (length < 4)
goto trunc;
if (ndo->ndo_snapend < data)
goto trunc;
caplen = ndo->ndo_snapend - data;
if (caplen < 4)
goto trunc;
maxbuf = d... | 0 | 93,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: static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf)
{
int err;
if (use_xsave())
err = copy_xregs_to_user(buf);
else if (use_fxsr())
err = copy_fxregs_to_user((struct fxregs_state __user *) buf);
else
err = copy_fregs_to_user((struct fregs_state __user *) buf);
if (unlikely(err) ... | 0 | 60,448 |
Analyze the following 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 virgl_cmd_resource_flush(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_resource_flush rf;
int i;
VIRTIO_GPU_FILL_CMD(rf);
trace_virtio_gpu_cmd_res_flush(rf.resource_id,
rf.r.width, rf.r.he... | 0 | 9,756 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void DownloadManagerImpl::DownloadInterrupted(
download::DownloadItemImpl* download) {
WebContents* web_contents = DownloadItemUtils::GetWebContents(download);
if (!web_contents) {
download::RecordDownloadCountWithSource(
download::INTERRUPTED_WITHOUT_WEBCONTENTS, download->download_source());... | 0 | 151,197 |
Analyze the following 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 CSoundFile::Create(LPCBYTE lpStream, DWORD dwMemLength)
{
int i;
m_nType = MOD_TYPE_NONE;
m_dwSongFlags = 0;
m_nChannels = 0;
m_nMixChannels = 0;
m_nSamples = 0;
m_nInstruments = 0;
m_nFreqFactor = m_nTempoFactor = 128;
m_nMasterVolume = 128;
m_nDefaultGlobalVolume = 256;
m_nGlobalVolume = 256;
... | 0 | 8,468 |
Analyze the following 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 __munlock_isolation_failed(struct page *page)
{
if (PageUnevictable(page))
__count_vm_event(UNEVICTABLE_PGSTRANDED);
else
__count_vm_event(UNEVICTABLE_PGMUNLOCKED);
}
Commit Message: mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_... | 0 | 38,268 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static unsigned int poll_urgent(struct file *fp,
struct poll_table_struct *pt)
{
struct hfi1_filedata *fd = fp->private_data;
struct hfi1_ctxtdata *uctxt = fd->uctxt;
struct hfi1_devdata *dd = uctxt->dd;
unsigned pollflag;
poll_wait(fp, &uctxt->wait, pt);
spin_lock_irq(&dd->uctxt_lock);
if (uctxt->ur... | 0 | 52,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: int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
int offset, int len, int odd, struct sk_buff *skb),
void *from, int length, int transhdrlen,
int hlimit, int tclass, struct ipv6_txoptions *opt, struct flowi6 *fl6,
struct rt6_info *rt, unsigned int flags, int dontfrag)
{
struct inet_sock... | 1 | 165,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: PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...)
{
va_list args;
va_start(args, msg);
php_libxml_internal_error_handler(PHP_LIBXML_ERROR, ctx, &msg, args);
va_end(args);
}
Commit Message:
CWE ID: | 0 | 14,251 |
Analyze the following 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 BluetoothSocketDisconnectFunction::OnSuccess() {
DCHECK_CURRENTLY_ON(work_thread_id());
Respond(ArgumentList(bluetooth_socket::Disconnect::Results::Create()));
}
Commit Message: chrome.bluetoothSocket: Fix regression in send()
In https://crrev.com/c/997098, params_ was changed to a local variable,
but ... | 0 | 154,075 |
Analyze the following 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 decode_smpte_tc(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
skip_bits(gb, 16); /* Time_code[63..48] */
check_marker(s->avctx, gb, "after Time_code[63..48]");
skip_bits(gb, 16); /* Time_code[47..32] */
check_marker(s->avctx, gb, "after Time_code[47..32]"... | 0 | 74,789 |
Analyze the following 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_setup_request(struct cifs_ses *ses, struct smb_rqst *rqst)
{
int rc;
struct smb_hdr *hdr = (struct smb_hdr *)rqst->rq_iov[0].iov_base;
struct mid_q_entry *mid;
rc = allocate_mid(ses, hdr, &mid);
if (rc)
return ERR_PTR(rc);
rc = cifs_sign_rqst(rqst, ses->server, &mid->sequence_number);
if (rc) {
c... | 0 | 30,090 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mime_list_cancel (NautilusDirectory *directory)
{
if (directory->details->mime_list_in_progress != NULL)
{
g_cancellable_cancel (directory->details->mime_list_in_progress->cancellable);
}
}
Commit Message: mime-actions: use file metadata for trusting desktop files
Currently we only trust des... | 0 | 60,943 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long offset, addr = (unsigned long)from;
unsigned long size, len = 0;
struct page *page;
void *map;
int ret;
do {
ret = __get_user_pages_fast(addr, 1, 0, &page);
if (!ret)
break;
offset = addr & (PAGE_SIZE - 1);
s... | 0 | 25,753 |
Analyze the following 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 VRDisplay::OnVSync(device::mojom::blink::VRPosePtr pose,
mojo::common::mojom::blink::TimeDeltaPtr time,
int16_t frame_id,
device::mojom::blink::VRVSyncProvider::Status error) {
v_sync_connection_failed_ = false;
switch (error) {... | 1 | 171,997 |
Analyze the following 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 PageHandler::OnSwapCompositorFrame(
viz::CompositorFrameMetadata frame_metadata) {
last_compositor_frame_metadata_ = std::move(frame_metadata);
has_compositor_frame_metadata_ = true;
if (screencast_enabled_)
InnerSwapCompositorFrame();
}
Commit Message: DevTools: speculative fix for crash in ... | 0 | 148,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: ExtensionFunctionDispatcher::Delegate::GetAssociatedWebContents() const {
return NULL;
}
Commit Message: Tighten restrictions on hosted apps calling extension APIs
Only allow component apps to make any API calls, and for them only allow the namespaces they explicitly have permission for (plus chrome.test - I ... | 0 | 114,250 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
{
struct semaphore *sem = (struct semaphore *)handle;
if (!acpi_os_initialized)
return AE_OK;
if (!sem || (units < 1))
return AE_BAD_PARAMETER;
if (units > 1)
return AE_SUPPORT;
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore... | 0 | 53,868 |
Analyze the following 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 OxideQQuickWebViewPrivate::CommandsUpdated() {
Q_Q(OxideQQuickWebView);
emit q->navigationHistoryChanged();
}
Commit Message:
CWE ID: CWE-20 | 0 | 17,027 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MessageLoop::MessageLoop(Type type)
: MessageLoop(type, MessagePumpFactoryCallback()) {
BindToCurrentThread();
}
Commit Message: Introduce RunLoop::Type::NESTABLE_TASKS_ALLOWED to replace MessageLoop::ScopedNestableTaskAllower.
(as well as MessageLoop::SetNestableTasksAllowed())
Surveying usage: the scop... | 0 | 126,546 |
Analyze the following 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 setVerticalAdjustment(WebKitWebView* webView, GtkAdjustment* adjustment)
{
Page* page = core(webView);
if (page)
static_cast<WebKit::ChromeClient*>(page->chrome()->client())->adjustmentWatcher()->setVerticalAdjustment(adjustment);
}
Commit Message: 2011-06-02 Joone Hur <joone.hur@co... | 0 | 100,508 |
Analyze the following 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 caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *m, size_t len, int flags)
{
struct sock *sk = sock->sk;
struct sk_buff *skb;
int ret;
int copylen;
ret = -EOPNOTSUPP;
if (m->msg_flags&MSG_OOB)
goto read_error;
skb = skb_recv_datagram(sk, flags, 0 , &ret);
... | 1 | 166,040 |
Analyze the following 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 get_camera_metadata_entry(camera_metadata_t *src,
size_t index,
camera_metadata_entry_t *entry) {
if (src == NULL || entry == NULL) return ERROR;
if (index >= src->entry_count) return ERROR;
camera_metadata_buffer_entry_t *buffer_entry = get_entries(src) + index;
entry->index = index;
entry->ta... | 0 | 157,933 |
Analyze the following 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_DrawConsole( void ) {
Con_CheckResize();
if ( clc.state == CA_DISCONNECTED ) {
if ( !( Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME)) ) {
Con_DrawSolidConsole( 1.0 );
return;
}
}
if ( con.displayFrac ) {
Con_DrawSolidConsole( con.displayFrac );
} else {
if ( clc.state == CA_ACTI... | 0 | 95,572 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int megasas_dcmd_ld_list_query(MegasasState *s, MegasasCmd *cmd)
{
uint16_t flags;
struct mfi_ld_targetid_list info;
size_t dcmd_size = sizeof(info), resid;
uint32_t num_ld_disks = 0, max_ld_disks = s->fw_luns;
BusChild *kid;
/* mbox0 contains flags */
flags = le16_to_cpu(cmd->... | 0 | 10,428 |
Analyze the following 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 RendererSchedulerImpl::ShouldPrioritizeInputEvent(
const blink::WebInputEvent& web_input_event) {
if ((web_input_event.GetType() == blink::WebInputEvent::kMouseDown ||
web_input_event.GetType() == blink::WebInputEvent::kMouseMove) &&
(web_input_event.GetModifiers() &
blink::WebInput... | 0 | 143,480 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::string16 DevToolsConfirmInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
IDS_DEV_TOOLS_CONFIRM_ALLOW_BUTTON : IDS_DEV_TOOLS_CONFIRM_DENY_BUTTON);
}
Commit Message: DevTools: move front-end URL handling to DevToolsUIBindingds... | 0 | 138,317 |
Analyze the following 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 LayerTreeHost::BeginCommitOnImplThread(LayerTreeHostImpl* host_impl) {
DCHECK(proxy_->IsImplThread());
TRACE_EVENT0("cc", "LayerTreeHost::CommitTo");
}
Commit Message: Removed pinch viewport scroll offset distribution
The associated change in Blink makes the pinch viewport a proper
ScrollableArea meani... | 0 | 111,949 |
Analyze the following 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 s32 snto32(__u32 value, unsigned n)
{
switch (n) {
case 8: return ((__s8)value);
case 16: return ((__s16)value);
case 32: return ((__s32)value);
}
return value & (1 << (n - 1)) ? value | (-1 << n) : value;
}
Commit Message: HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver w... | 0 | 49,533 |
Analyze the following 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 bio_add_page(struct bio *bio, struct page *page,
unsigned int len, unsigned int offset)
{
struct bio_vec *bv;
/*
* cloned bio must not modify vec list
*/
if (WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED)))
return 0;
/*
* For filesystems with a blocksize smaller than the pagesize
* we will often... | 0 | 62,804 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void HTMLTextAreaElement::accessKeyAction(bool)
{
focus();
}
Commit Message: Add HTMLFormControlElement::supportsAutofocus to fix a FIXME comment.
This virtual function should return true if the form control can hanlde
'autofocucs' attribute if it is specified.
Note: HTMLInputElement::supportsAutofocus reu... | 0 | 114,071 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool IsPrintScalingDisabled() {
if (ppp_printing_ != NULL) {
PP_Bool result = ppp_printing_->IsScalingDisabled(plugin_->pp_instance());
return result == PP_TRUE;
}
return false;
}
Commit Message: Revert 143656 - Add an IPC channel between the NaCl loader process and the renderer.
BUG=... | 0 | 103,367 |
Analyze the following 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 LogKeyboardControlEvent(KeyboardControlEvent event) {
UMA_HISTOGRAM_ENUMERATION(
"VirtualKeyboard.KeyboardControlEvent",
event,
keyboard::KEYBOARD_CONTROL_MAX);
}
Commit Message: Move smart deploy to tristate.
BUG=
Review URL: https://codereview.chromium.org/1149383006
Cr-Commit-Posit... | 0 | 123,337 |
Analyze the following 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 raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
void *from, size_t length,
struct rtable **rtp,
unsigned int flags)
{
struct inet_sock *inet = inet_sk(sk);
struct net *net = sock_net(sk);
struct iphdr *iph;
struct sk_buff *skb;
unsigned int iphlen;
int err;
struct rtable *... | 0 | 40,158 |
Analyze the following 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 CompositorImpl::TearDownDisplayAndUnregisterRootFrameSink() {
SCOPED_UMA_HISTOGRAM_LONG_TIMER("CompositorImplAndroid.TearDownDisplayTime");
if (enable_viz_) {
if (display_private_ && HavePendingReadbacks()) {
display_private_->ForceImmediateDrawAndSwapIfPossible();
}
GetHostFrameSinkM... | 0 | 130,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 op_attr_secret_value_clear(void *attr)
{
struct tee_cryp_obj_secret *key = attr;
key->key_size = 0;
memset(key + 1, 0, key->alloc_size);
}
Commit Message: svc: check for allocation overflow in crypto calls part 2
Without checking for overflow there is a risk of allocating a buffer
with size smal... | 0 | 86,844 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: read_one_file(Image *image)
{
if (!(image->opts & READ_FILE) || (image->opts & USE_STDIO))
{
/* memory or stdio. */
FILE *f = fopen(image->file_name, "rb");
if (f != NULL)
{
if (image->opts & READ_FILE)
image->input_file = f;
else /* memory */
{
if (fseek(f, 0, SEEK_END) == 0)
... | 1 | 173,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: void RuleMatchCandidateTxArrayInit(DetectEngineThreadCtx *det_ctx, uint32_t size)
{
DEBUG_VALIDATE_BUG_ON(det_ctx->tx_candidates);
det_ctx->tx_candidates = SCCalloc(size, sizeof(RuleMatchCandidateTx));
if (det_ctx->tx_candidates == NULL) {
FatalError(SC_ERR_MEM_ALLOC, "failed to allocate %"PRI... | 0 | 84,307 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virtual status_t allocateBufferWithBackup(
node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms,
buffer_id *buffer) {
Parcel data, reply;
data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
data.writeInt32((int32_t)node);
data.writeInt32(port_index);
... | 0 | 161,313 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestInterface* impl)
{
return wrap<JSTestInterface>(exec, globalObject, impl);
}
Commit Message: [JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
... | 0 | 101,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: void RenderBox::computePositionedLogicalHeight(LogicalExtentComputedValues& computedValues) const
{
if (isReplaced()) {
computePositionedLogicalHeightReplaced(computedValues);
return;
}
const RenderBoxModelObject* containerBlock = toRenderBoxModelObject(container());
const Layo... | 0 | 116,493 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: LayoutObject* ImageInputType::createLayoutObject(const ComputedStyle& style) const
{
if (m_useFallbackContent)
return new LayoutBlockFlow(&element());
LayoutImage* image = new LayoutImage(&element());
image->setImageResource(LayoutImageResource::create());
return image;
}
Commit Message: ... | 0 | 133,004 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev)
{
if (!syncEvents.playingEvents)
NoticeTimeMillis(dev, &ev->any.time);
}
Commit Message:
CWE ID: CWE-119 | 0 | 4,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: int filemap_fdatawrite(struct address_space *mapping)
{
return __filemap_fdatawrite(mapping, WB_SYNC_ALL);
}
Commit Message: fix writev regression: pan hanging unkillable and un-straceable
Frederik Himpe reported an unkillable and un-straceable pan process.
Zero length iovecs can go into an infinite loop in w... | 0 | 58,799 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BitReaderCore::RefillCurrentRegister() {
if (nbits_ == kRegWidthInBits || nbits_next_ == 0)
return;
reg_ |= (reg_next_ >> nbits_);
int free_nbits = kRegWidthInBits - nbits_;
if (free_nbits >= nbits_next_) {
nbits_ += nbits_next_;
reg_next_ = 0;
nbits_next_ = 0;
return;
}
nb... | 0 | 151,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: void RenderView::StartPluginIme() {
IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id());
msg->set_unblock(true);
Send(msg);
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.chromium.o... | 0 | 98,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: usage (int argc,
char *argv[])
{
execlp ("man", "man", "part_id", NULL);
g_printerr ("Cannot show man page: %m\n");
exit (1);
}
Commit Message:
CWE ID: CWE-200 | 0 | 11,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: u2fh_devs_discover (u2fh_devs * devs, unsigned *max_index)
{
struct hid_device_info *di, *cur_dev;
u2fh_rc res = U2FH_NO_U2F_DEVICE;
struct u2fdevice *dev;
di = hid_enumerate (0, 0);
for (cur_dev = di; cur_dev; cur_dev = cur_dev->next)
{
int found = 0;
unsigned short usage_page = 0, usa... | 0 | 91,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 void seq_local_event(unsigned char *event_rec)
{
unsigned char cmd = event_rec[1];
unsigned int parm = *((unsigned int *) &event_rec[4]);
switch (cmd)
{
case LOCL_STARTAUDIO:
DMAbuf_start_devices(parm);
break;
default:;
}
}
Commit Message: sound/oss: remove offset from load_patch cal... | 0 | 27,611 |
Analyze the following 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 atl2_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
struct atl2_hw *hw = &adapter->hw;
u32 *eeprom_buff;
int first_dword, last_dword;
int ret_val = 0;
int i;
if (eeprom->len == 0)
return -EINVAL;
if (atl... | 0 | 55,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: void HTMLMediaElement::playbackStateChanged() {
BLINK_MEDIA_LOG << "playbackStateChanged(" << (void*)this << ")";
if (!webMediaPlayer())
return;
if (webMediaPlayer()->paused())
pauseInternal();
else
playInternal();
}
Commit Message: [Blink>Media] Allow autoplay muted on Android by default
... | 0 | 128,864 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: read_uint32 (Header *header, guint8 *ptr)
{
if (header->big_endian)
return GUINT32_FROM_BE (*(guint32 *) ptr);
else
return GUINT32_FROM_LE (*(guint32 *) ptr);
}
Commit Message: Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, u... | 0 | 84,423 |
Analyze the following 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 do_make_slave(struct mount *mnt)
{
struct mount *peer_mnt = mnt, *master = mnt->mnt_master;
struct mount *slave_mnt;
/*
* slave 'mnt' to a peer mount that has the
* same root dentry. If none is available then
* slave it to anything that is available.
*/
while ((peer_mnt = next_peer(peer_mn... | 0 | 32,426 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: irc_server_connect (struct t_irc_server *server)
{
int set, length;
char *option_name;
struct t_config_option *proxy_type, *proxy_ipv6, *proxy_address, *proxy_port;
const char *proxy, *str_proxy_type, *str_proxy_address;
if (!server->buffer)
{
if (!irc_server_create_buffer (se... | 0 | 3,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: void LogHTMLForm(SavePasswordProgressLogger* logger,
SavePasswordProgressLogger::StringID message_id,
const blink::WebFormElement& form) {
logger->LogHTMLForm(message_id,
form.name().utf8(),
GURL(form.action().utf8()));
}
Commit Mess... | 0 | 156,978 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t Camera3Device::prepare(int maxCount, int streamId) {
ATRACE_CALL();
ALOGV("%s: Camera %d: Preparing stream %d", __FUNCTION__, mId, streamId);
Mutex::Autolock il(mInterfaceLock);
Mutex::Autolock l(mLock);
sp<Camera3StreamInterface> stream;
ssize_t outputStreamIdx = mOutputStreams.indexOfKe... | 0 | 161,075 |
Analyze the following 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(pg_lo_tell)
{
zval *pgsql_id = NULL;
int offset = 0;
pgLofp *pgsql;
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "r", &pgsql_id) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(pgsql, pgLofp *, &pgsql_id, -1, "PostgreSQL large object", le_lofp);
offset = lo_tell((PGc... | 0 | 14,742 |
Analyze the following 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 swipe_right() const { return swipe_right_; }
Commit Message: Pass ui::LatencyInfo correct with unified gesture detector on Aura.
BUG=379812
TEST=GestureRecognizerTest.LatencyPassedFromTouchEvent
Review URL: https://codereview.chromium.org/309823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27... | 0 | 112,130 |
Analyze the following 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 InputType::CanSetValue(const String&) {
return true;
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing ... | 0 | 126,178 |
Analyze the following 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 sdp_dump(GF_Box *a, FILE * trace)
{
GF_SDPBox *p = (GF_SDPBox *)a;
gf_isom_box_dump_start(a, "SDPBox", trace);
fprintf(trace, ">\n");
if (p->sdpText)
fprintf(trace, "<!-- sdp text: %s -->\n", p->sdpText);
gf_isom_box_dump_done("SDPBox", a, trace);
return GF_OK;
}
Commit Message: fixed 2 possible h... | 0 | 80,838 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GSList *nicklist_get_same_unique(SERVER_REC *server, void *id)
{
NICKLIST_GET_SAME_UNIQUE_REC rec;
GSList *tmp;
g_return_val_if_fail(IS_SERVER(server), NULL);
g_return_val_if_fail(id != NULL, NULL);
rec.id = id;
rec.list = NULL;
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
rec.ch... | 0 | 63,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: sp<IMediaSource> FLACExtractor::getTrack(size_t index)
{
if (mInitCheck != OK || index > 0) {
return NULL;
}
return new FLACSource(mDataSource, mTrackMetadata);
}
Commit Message: FLACExtractor: copy protect mWriteBuffer
Bug: 30895578
Change-Id: I4cba36bbe3502678210e5925181683df9726b431
CWE ID: CWE-119 | 0 | 162,514 |
Analyze the following 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_header(void *arg, const char *name, const char *val)
{
struct check_header_ctx *ctx = arg;
if (name[0] == '\0') {
ctx->error = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02428)
"Empty response header name, aborting request");
r... | 0 | 43,629 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.