code
string
target
int64
Check and analyze this code for any security issues. Mangle(input, control) /* returns a pointer to a controlled Mangle */ char *input; char *control; { int limit; register char *ptr; static char area[STRINGSIZE]; char area2[STRINGSIZE]; area[0] = '\0'; strcpy(area, input); for (p...
1
Evaluate this code to identify possible vulnerabilities. static void kvm_destroy_vm(struct kvm *kvm) { int i; struct mm_struct *mm = kvm->mm; kvm_uevent_notify_change(KVM_EVENT_DESTROY_VM, kvm); kvm_destroy_vm_debugfs(kvm); kvm_arch_sync_events(kvm); spin_lock(&kvm_lock); list_del(&kvm->vm_list); spin_unlock(...
0
Scrutinize this code to detect security risks. noname_disable_map(Node** plink, GroupNumRemap* map, int* counter) { int r = 0; Node* node = *plink; switch (NODE_TYPE(node)) { case NODE_LIST: case NODE_ALT: do { r = noname_disable_map(&(NODE_CAR(node)), map, counter); } while (r == 0 && IS_NOT_...
0
Check and analyze this code for any security issues. ArgParser::arg40Print(char* parameter) { o.r2_print = (strcmp(parameter, "y") == 0); }
0
Audit this code for any potential security threats. dtls1_buffer_message(SSL *s, int is_ccs) { pitem *item; hm_fragment *frag; unsigned char seq64be[8]; /* this function is called immediately after a message has * been serialized */ OPENSSL_assert(s->init_off == 0); frag = dtls1_hm_fragment_new(s->init_num...
0
Examine this code to see if it is at risk of exploitation. static llparse_state_t llhttp__internal__run( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { int match; switch ((llparse_state_t) (intptr_t) state->_current) { case s_n_llhttp__internal__n_invoke_llhttp__aft...
1
Audit this code for any potential security threats. account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) { update_load_sub(&cfs_rq->load, se->load.weight); if (!parent_entity(se)) dec_cpu_load(rq_of(cfs_rq), se->load.weight); if (entity_is_task(se)) add_cfs_task_weight(cfs_rq, -se->load.weight...
0
Scan this code to detect any possible vulnerabilities. int pmixp_coll_ring_unpack(Buf buf, pmixp_coll_type_t *type, pmixp_coll_ring_msg_hdr_t *ring_hdr, pmixp_proc_t **r, size_t *nr) { pmixp_proc_t *procs = NULL; uint32_t nprocs = 0; uint32_t tmp; int rc, i; /* 1. extract the type of collective */ i...
1
Check and analyze this code for any security issues. vhost_user_set_vring_num(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; struct vhost_virtqueue *vq = dev->virtqueue[msg->payload.state.index]; vq->size = msg->payload.state.num; /* VIRTIO 1...
1
Test and validate this code for security flaws. static char *bdevt_str(dev_t devt, char *buf) { if (MAJOR(devt) <= 0xff && MINOR(devt) <= 0xff) { char tbuf[BDEVT_SIZE]; snprintf(tbuf, BDEVT_SIZE, "%02x%02x", MAJOR(devt), MINOR(devt)); snprintf(buf, BDEVT_SIZE, "%-9s", tbuf); } else snprintf(buf, BDEVT_SIZE, ...
0
Review and verify if this code is vulnerable. int xsocket(int domain, int type, int protocol) { int r = socket(domain, type, protocol); if (r < 0) { const char *s = "INET"; if (domain == AF_PACKET) s = "PACKET"; if (domain == AF_NETLINK) s = "NETLINK"; if (domain == AF_INET6...
0
Review and verify if this code is vulnerable. qemuProcessHandleMonitorEOF(qemuMonitorPtr mon, virDomainObjPtr vm, void *opaque) { virQEMUDriverPtr driver = opaque; qemuDomainObjPrivatePtr priv; struct qemuProcessEvent *processEvent; virObjectLock...
1
Check and analyze this code for any security issues. static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) { struct kmem_cache *slab; va_list args; va_start(args, fmt); vsnprintf(slab_name_fmt, sizeof(slab_name_fmt), fmt, args); va_end(args); slab = kmem_cache...
1
Assess this code for potential security weaknesses. send_setup_for_user (GdmSession *self, const char *service_name) { const char *display_name; const char *display_device; const char *display_seat_id; const char *display_hostname; const char...
1
Analyze this code to uncover any security loopholes. static void v9fs_fsync(void *opaque) { int err; int32_t fid; int datasync; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; err = pdu_unmarshal(pdu, offset, "dd", &fid, &datasync); if (err < 0) { goto out_nofid; ...
0
Scrutinize this code to detect security risks. static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev, struct rf_tech_specific_params_nfca_poll *nfca_poll, __u8 *data) { nfca_poll->sens_res = __le16_to_cpu(*((__u16 *)data)); data += 2; nfca_poll->nfcid1_len = *data++; pr_debug("s...
1
Look into this code to determine if it is secure. static void esp_register_types(void) { type_register_static(&sysbus_esp_info); type_register_static(&esp_info); }
0
Evaluate this code to identify possible vulnerabilities. void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, int status) { struct dwc3 *dwc = dep->dwc; req->started = false; list_del(&req->list); req->remaining = 0; if (req->request.status == -EINPROGRESS) req->request.status = status...
1
Check and analyze this code for any security issues. int tls1_process_sigalgs(SSL *s, const unsigned char *data, int dsize) { int i, idx; const EVP_MD *md; CERT *c = s->cert; TLS_SIGALGS *sigptr; /* Extension ignored for TLS versions below 1.2 */ if (TLS1_get_version(s) < TLS1_2_VERSION) return 1; /* Should ...
1
Perform a security check on this code. static void i8042_stop(struct serio *serio) { struct i8042_port *port = serio->port_data; port->exists = false; /* * We synchronize with both AUX and KBD IRQs because there is * a (very unlikely) chance that AUX IRQ is raised for KBD port * and vice versa. */ synchr...
1
Investigate whether this code has any weaknesses. int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name) { reg2 uint key; reg1 MI_KEYDEF *keyinfo; File new_file; my_off_t index_pos[HA_MAX_POSSIBLE_KEY]; uint r_locks,w_locks; int old_lock; MYISAM_SHARE *share=info->s; MI_STATE_INFO old_...
1
Look into this code to determine if it is secure. compileMacro(FileInfo *file, const Macro **macro) { // parse name CharsString token; if (!getToken(file, &token, "macro name")) return 0; switch (getOpcode(file, &token)) { case CTO_UpLow: // deprecated so "uplow" may be used as macro name case CTO_None: brea...
0
Look into this code to determine if it is secure. p11_mmap_open (const char *path, struct stat *sb, void **data, size_t *size) { HANDLE mapping; LARGE_INTEGER large; DWORD errn; p11_mmap *map; map = calloc (1, sizeof (p11_mmap)); if (map == NULL) { errno = ENOMEM; ...
0
Scan this code to detect any possible vulnerabilities. int oauth2_try_parse_jwt(const struct oauth2_settings *set, const char *token, ARRAY_TYPE(oauth2_field) *fields, bool *is_jwt_r, const char **error_r) { const char *const *blobs = t_strsplit(token, "."); int ret; i_assert(set->key_dict != NULL); /* w...
1
Look into this code to determine if it is secure. scanner_literal_is_const_reg (parser_context_t *context_p, /**< context */ uint16_t literal_index) /**< literal index */ { if (literal_index < PARSER_REGISTER_START) { /* Re-assignment of non-register const bindings are detected el...
0
Scan this code to detect any possible vulnerabilities. GF_Err Media_CheckDataEntry(GF_MediaBox *mdia, u32 dataEntryIndex) { GF_DataEntryURLBox *entry; GF_DataMap *map; GF_Err e; if (!mdia || !dataEntryIndex || dataEntryIndex > gf_list_count(mdia->information->dataInformation->dref->child_boxes)) return GF_BAD_PAR...
1
Assess this code for potential security weaknesses. void opj_get_tile_dimensions(opj_image_t * l_image, opj_tcd_tilecomp_t * l_tilec, opj_image_comp_t * l_img_comp, OPJ_UINT32* l_size_comp, OPJ_UINT32* l...
0
Audit this code for any potential security threats. static char* cJSON_strdup( const char* str ) { size_t len; char* copy; len = strlen( str ) + 1; if ( ! ( copy = (char*) cJSON_malloc( len ) ) ) return 0; memcpy( copy, str, len ); return copy; }
1
Scrutinize this code to detect security risks. HeaderEntry* HeaderMapImpl::get(const LowerCaseString& key) { for (HeaderEntryImpl& header : headers_) { if (header.key() == key.get().c_str()) { return &header; } } return nullptr; }
1
Investigate whether this code has any weaknesses. int main(void) { #if defined(UMM_INTEGRITY_CHECK) TRY(test_integrity_check()); #endif #if defined(UMM_POISON) TRY(test_poison()); #endif TRY(random_stress()); TRY(test_oom_random()); return 0; }
1
Assess this code for potential security weaknesses. evdev_device_dispatch(void *data) { struct evdev_device *device = data; struct libinput *libinput = evdev_libinput_context(device); struct input_event ev; int rc; bool once = false; /* If the compositor is repainting, this function is called only once * per ...
0
Assess this code for potential security weaknesses. CheckKeyBehaviors(XkbDescPtr xkb, xkbSetMapReq * req, xkbBehaviorWireDesc ** wireRtrn, int *errorRtrn) { register xkbBehaviorWireDesc *wire = *wireRtrn; register XkbServerMapPtr server = xkb->server; register unsigned i...
0
Examine and determine whether this code contains vulnerabilities. static bool parse_chained_fixups(struct MACH0_(obj_t) * bin, ut32 offset, ut32 size) { struct dyld_chained_fixups_header header; if (size < sizeof(header)) { return false; } if (rz_buf_fread_at(bin->b, offset, (ut8 *)&header, "7i", 1) != sizeof(he...
0
Analyze this code to uncover any security loopholes. bufOptRemove(int *opt, char **arg) { DEFiRet; bufOpt_t *pBuf; if(bufOptRoot == NULL) ABORT_FINALIZE(RS_RET_END_OF_LINKEDLIST); pBuf = bufOptRoot; *opt = pBuf->optchar; *arg = pBuf->arg; bufOptRoot = pBuf->pNext; free(pBuf); finalize_it: RETiRet; }
0
Scrutinize this code to detect security risks. static int read_channel_identities (WavpackContext *wpc, WavpackMetadata *wpmd) { unsigned char *idents = wpmd->data; int i; if (!wpmd->data || !wpmd->byte_length) return FALSE; for (i = 0; i < wpmd->byte_length; ++i) if (!idents [i]) ...
1
Analyze this code to uncover any security loopholes. static int do_recv_XFocusChangeEvent(rpc_message_t *message, XEvent *xevent) { return RPC_ERROR_NO_ERROR; }
0
Assess this code for potential security weaknesses. static int mif_process_cmpt(mif_hdr_t *hdr, char *buf) { jas_tvparser_t *tvp; mif_cmpt_t *cmpt; int id; cmpt = 0; tvp = 0; if (!(cmpt = mif_cmpt_create())) { goto error; } cmpt->tlx = 0; cmpt->tly = 0; cmpt->sampperx = 0; cmpt->samppery = 0; cmpt->wid...
1
Check and analyze this code for any security issues. static void diff_pixels_c(int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, int stride){ int i; /* read the pixels */ for(i=0;i<8;i++) { block[0] = s1[0] - s2[0]; block[1] = s1[1] - s2[1]; ...
0
Check and analyze this code for any security issues. struct CImgInstanceException : public CImgException {
0
Scan this code to detect any possible vulnerabilities. NORET_TYPE void do_exit(long code) { struct task_struct *tsk = current; int group_dead; profile_task_exit(tsk); WARN_ON(atomic_read(&tsk->fs_excl)); if (unlikely(in_interrupt())) panic("Aiee, killing interrupt handler!"); if (unlikely(!tsk->pid)) pani...
1
Test and validate this code for security flaws. void APar_ExtractDetails(FILE *isofile, uint8_t optional_output) { char uint32_buffer[5]; Trackage track = {0}; AtomicInfo *mvhdAtom = APar_FindAtom("moov.mvhd", false, VERSIONED_ATOM, 0); if (mvhdAtom != NULL) { APar_ExtractMovieDetails(uint32_buffer, isofi...
1
Scan this code to detect any possible vulnerabilities. static int bsg_open(struct inode *inode, struct file *file) { struct bsg_device *bd; bd = bsg_get_device(inode, file); if (IS_ERR(bd)) return PTR_ERR(bd); file->private_data = bd; return 0; }
0
Examine and determine whether this code contains vulnerabilities. static struct wildmat *split_wildmats(char *str) { const char *prefix; char pattern[MAX_MAILBOX_BUFFER] = "", *p, *c; struct wildmat *wild = NULL; int n = 0; if ((prefix = config_getstring(IMAPOPT_NEWSPREFIX))) snprintf(pattern, si...
1
Analyze this code to uncover any security loopholes. static int fits_nan_32 (unsigned char *v) {register unsigned long k; k = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; k &= 0x7fffffff; /* Dont care about the sign bit */ /* See NOST Definition of the Flexible Image Transport System (FITS), */ /* Appendi...
0
Audit this code for any potential security threats. choose_windows(s) const char *s; { register int i; for (i = 0; winchoices[i].procs; i++) { if ('+' == winchoices[i].procs->name[0]) continue; if ('-' == winchoices[i].procs->name[0]) continue; if (!strcmpi(s, w...
1
Analyze this code to uncover any security loopholes. int yr_object_structure_set_member( YR_OBJECT* object, YR_OBJECT* member) { YR_STRUCTURE_MEMBER* sm; assert(object->type == OBJECT_TYPE_STRUCTURE); // Check if the object already have a member with the same identifier if (yr_object_lookup_field(ob...
0
Audit this code for any potential security threats. static void cmd_dcc_close(char *data, SERVER_REC *server) { GSList *tmp, *next; char *nick; void *free_arg; int found; g_return_if_fail(data != NULL); if (g_ascii_strncasecmp(data, "CHAT ", 5) != 0 || !cmd_get_params(data, &free_arg, 2, NULL, &nick)) r...
0
Inspect this code to see if it has any security flaws. ccp_run_passthru_nomap_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { struct ccp_passthru_nomap_engine *pt = &cmd->u.passthru_nomap; struct ccp_dm_workarea mask; struct ccp_op op; int ret; if (!pt->final && (pt->src_len & (CCP_PASSTHRU_BLO...
0
Inspect this code to see if it has any security flaws. void on_compression_buffer_use() { if (++buffer_use_count == clear_buffers_trigger) { input_buffer.clear(); output_buffer.clear(); buffer_use_count = 0; } }
0
Analyze this code to uncover any security loopholes. static __u16 sctp_ulpq_renege_order(struct sctp_ulpq *ulpq, __u16 needed) { __u16 freed = 0; __u32 tsn; struct sk_buff *skb; struct sctp_ulpevent *event; struct sctp_tsnmap *tsnmap; tsnmap = &ulpq->asoc->peer.tsn_map; while ((skb = __skb_dequeue_tail(&ulpq-...
0
Audit this code for any potential security threats. nfsd42_encode_write_res(struct nfsd4_compoundres *resp, struct nfsd42_write_res *write) { __be32 *p; p = xdr_reserve_space(&resp->xdr, 4 + 8 + 4 + NFS4_VERIFIER_SIZE); if (!p) return nfserr_resource; *p++ = cpu_to_be32(0); p = xdr_encode_hyper(p, write->wr_b...
0
Scan this code to detect any possible vulnerabilities. gdm_session_accredit (GdmSession *self, const char *service_name) { GdmSessionConversation *conversation; g_return_if_fail (GDM_IS_SESSION (self)); conversation = find_conversation_by_name (self, service_name); ...
1
Audit this code for any potential security threats. static int __ntop_rrd_args (lua_State* vm, char **filename, char **cf, time_t *start, time_t *end) { char *start_s, *end_s, *err; rrd_time_value_t start_tv, end_tv; if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_PARAM_ERROR); if((*file...
0
Analyze this code to uncover any security loopholes. mix_pool(byte *pool) { char *hashbuf = pool + POOLSIZE; char *p, *pend; int i, n; RMD160_CONTEXT md; rmd160_init( &md ); #if DIGESTLEN != 20 #error must have a digest length of 20 for ripe-md-160 #endif /* loop over the pool */ pend = po...
1
Look into this code to determine if it is secure. static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota) { int i, ret = 0, runtime_enabled, runtime_was_enabled; struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; if (tg == &root_task_group) return -EINVAL; /* * Ensure we have at some amo...
0
Review and verify if this code is vulnerable. ecma_op_internal_buffer_append (ecma_collection_t *container_p, /**< internal container pointer */ ecma_value_t key_arg, /**< key argument */ ecma_value_t value_arg, /**< value argument */ ...
1
Inspect this code to see if it has any security flaws. static OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno) { const OPJ_CHAR *prog = 00; OPJ_INT32 i; OPJ_UINT32 tpnum = 1; opj_tcp_t *tcp = 00; opj_poc_t * l_current_poc = 00; ...
0
Check and analyze this code for any security issues. static int on_data_chunk_recv_cb(nghttp2_session *ngh2, uint8_t flags, int32_t stream_id, const uint8_t *data, size_t len, void *userp) { h2_session *session = (h2_session *)userp; apr_status_...
1
Inspect this code to see if it has any security flaws. int udpv6_offload_exit(void) { return inet6_del_offload(&udpv6_offload, IPPROTO_UDP); }
0
Investigate whether this code has any weaknesses. int main(int argc, char** argv) { Context ctx; BrotliDecoderResult result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT; size_t available_in; const uint8_t* next_in; size_t available_out = BUFFER_SIZE; uint8_t* next_out; init(&ctx); ctx.fin = fdopen(STDIN_F...
0
Evaluate this code to identify possible vulnerabilities. int ssl3_get_new_session_ticket(SSL *s) { int ok,al,ret=0, ticklen; long n; const unsigned char *p; unsigned char *d; n=s->method->ssl_get_message(s, SSL3_ST_CR_SESSION_TICKET_A, SSL3_ST_CR_SESSION_TICKET_B, SSL3_MT_NEWSESSION_TICKET, 16384, &ok...
0
Investigate whether this code has any weaknesses. rsvg_new_filter_primitive_convolve_matrix (void) { RsvgFilterPrimitiveConvolveMatrix *filter; filter = g_new (RsvgFilterPrimitiveConvolveMatrix, 1); _rsvg_node_init (&filter->super.super); filter->super.in = g_string_new ("none"); filter->super.resu...
1
Examine and determine whether this code contains vulnerabilities. decode_bundle(bool load, const struct nx_action_bundle *nab, const struct vl_mff_map *vl_mff_map, uint64_t *tlv_bitmap, struct ofpbuf *ofpacts) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); struct o...
1
Inspect this code to see if it has any security flaws. rip6_entry_print(netdissect_options *ndo, register const struct netinfo6 *ni, int metric) { int l; l = ND_PRINT((ndo, "%s/%d", ip6addr_string(ndo, &ni->rip6_dest), ni->rip6_plen)); if (ni->rip6_tag) l += ND_PRINT((ndo, " [%d]", EXTRACT_16BITS(&ni->rip6_tag)))...
0
Inspect this code to see if it has any security flaws. static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf) { struct ath_buf *tbf; tbf = ath_tx_get_buffer(sc); if (WARN_ON(!tbf)) return NULL; ATH_TXBUF_RESET(tbf); tbf->bf_mpdu = bf->bf_mpdu; tbf->bf_buf_addr = bf->bf_buf_addr; m...
0
Check and analyze this code for any security issues. xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar end2, xmlChar end3) { xmlChar *buffer = NULL; size_t buffer_size = 0; size_t nbchars = 0; xmlChar *current = NULL; xmlChar *re...
1
Review and verify if this code is vulnerable. static int asf_read_picture(AVFormatContext *s, int len) { ASFContext *asf = s->priv_data; AVPacket pkt = { 0 }; const CodecMime *mime = ff_id3v2_mime_tags; enum AVCodecID id = AV_CODEC_ID_NONE; char mimetype[64]; uint8_t *desc =...
0
Look into this code to determine if it is secure. target_count_increase(struct iter_qstate* iq, int num) { target_count_create(iq); if(iq->target_count) iq->target_count[1] += num; }
1
Inspect this code to see if it has any security flaws. destroyPresentationContextList(LST_HEAD ** lst) { DUL_PRESENTATIONCONTEXT *pc; DUL_TRANSFERSYNTAX *ts; if ((lst == NULL) || (*lst == NULL)) return; while ((pc = (DUL_PRESENTATIONCONTEXT*) LST_Dequeue(lst)) != NULL) { if (pc->propos...
1
Look into this code to determine if it is secure. xfs_attr_shortform_compare(const void *a, const void *b) { xfs_attr_sf_sort_t *sa, *sb; sa = (xfs_attr_sf_sort_t *)a; sb = (xfs_attr_sf_sort_t *)b; if (sa->hash < sb->hash) { return -1; } else if (sa->hash > sb->hash) { return 1; } else { return sa->entno ...
0
Perform a security check on this code. on_handler_vanished(GDBusConnection *connection, const gchar *name, gpointer user_data) { struct tcmur_handler *handler = user_data; struct dbus_info *info = handler->opaque; if (info->register_invocation) { char *reason; reason = g_strdup_printf("...
1
Perform a security check on this code. RGWInitMultipart() {}
0
Check and analyze this code for any security issues. static void add_namespaces(Array &out, xmlNodePtr node, bool recursive) { if (node->ns) { add_namespace_name(out, node->ns); } for (xmlAttrPtr attr = node->properties; attr; attr = attr->next) { if (attr->ns) { add_namespace_name(out, attr->ns);...
0
Examine and determine whether this code contains vulnerabilities. int qemu_console_get_index(QemuConsole *con) { if (con == NULL) { con = active_console; } return con ? con->index : -1; }
0
Analyze this code to uncover any security loopholes. static int vc_translate(struct vc_data *vc, int *c, bool *rescan) { /* Do no translation at all in control states */ if (vc->vc_state != ESnormal) return *c; if (vc->vc_utf && !vc->vc_disp_ctrl) return *c = vc_translate_unicode(vc, *c, rescan); /* no utf o...
0
Test and validate this code for security flaws. int main(int argc, char **argv) { int fmtid; int id; char *infile; jas_stream_t *instream; jas_image_t *image; int width; int height; int depth; int numcmpts; int verbose; char *fmtname; if (jas_init()) { abort(); } cmdname = argv[0]; infile = 0; ver...
1
Examine this code to see if it is at risk of exploitation. md_build_mark_char_map(MD_CTX* ctx) { memset(ctx->mark_char_map, 0, sizeof(ctx->mark_char_map)); ctx->mark_char_map['\\'] = 1; ctx->mark_char_map['*'] = 1; ctx->mark_char_map['_'] = 1; ctx->mark_char_map['`'] = 1; ctx->mark_char_map['&...
0
Look into this code to determine if it is secure. php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */ { int fd = -1; int mode_rw = 0; php_stream * stream = NULL; ...
1
Evaluate this code to identify possible vulnerabilities. ctnetlink_parse_tuple_filter(const struct nlattr * const cda[], struct nf_conntrack_tuple *tuple, u32 type, u_int8_t l3num, struct nf_conntrack_zone *zone, u_int32_t flags) { struct nlattr *tb[CTA_TUPLE_MAX+1]; int err; memset(tupl...
1
Examine this code to see if it is at risk of exploitation. int wait_for_key_construction(struct key *key, bool intr) { int ret; ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, intr ? key_wait_bit_intr : key_wait_bit, intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); if (ret < 0) return ret; i...
0
Look into this code to determine if it is secure. int Exiv2::http(Exiv2::Dictionary& request, Exiv2::Dictionary& response, std::string& errors) { if (!request.count("verb")) request["verb"] = "GET"; if (!request.count("header")) request["header"] = ""; if (!request.count("version")) ...
1
Look into this code to determine if it is secure. print_line(linenr_T lnum, int use_number, int list) { int save_silent = silent_mode; // apply :filter /pat/ if (message_filtered(ml_get(lnum))) return; msg_start(); silent_mode = FALSE; info_message = TRUE; // use mch_msg(), not mch_errmsg()...
0
Audit this code for any potential security threats. hb_buffer_ensure( HB_Buffer buffer, HB_UInt size ) { HB_UInt new_allocated = buffer->allocated; if (size > new_allocated) { HB_Error error; while (size > new_allocated) new_allocated += (new_allocated >> 1) + 8; if ( buffer->posit...
1
Audit this code for any potential security threats. int ssl3_get_cert_verify(SSL *s) { EVP_PKEY *pkey=NULL; unsigned char *p; int al,ok,ret=0; long n; int type=0,i,j; X509 *peer; const EVP_MD *md = NULL; EVP_MD_CTX mctx; EVP_MD_CTX_init(&mctx); n=s->method->ssl_get_message(s, SSL3_ST_SR_CERT_VRFY_A, SS...
0
Review and verify if this code is vulnerable. forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s, UChar* range, UChar** low, UChar** high, UChar** low_prev) { UChar *p, *pprev = (UChar* )NULL; #ifdef ONIG_DEBUG_SEARCH fprintf(stderr, "forward_search_range: str: %d, end: %d, s: ...
1
Scrutinize this code to detect security risks. mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) { const UChar* p = *pp; *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p); (*pp)++; return 1; }
0
Scan this code to detect any possible vulnerabilities. const Http::LowerCaseString& traceStatusHeader() { static Http::LowerCaseString header("x-trace-status"); return header; }
0
Evaluate this code to identify possible vulnerabilities. ecma_op_advance_string_index (ecma_string_t *str_p, /**< input string */ ecma_length_t index, /**< given character index */ bool is_unicode) /**< true - if regexp object's "unicode" flag is set ...
0
Check and analyze this code for any security issues. vhost_backend_cleanup(struct virtio_net *dev) { if (dev->mem) { free_mem_region(dev); rte_free(dev->mem); dev->mem = NULL; } free(dev->guest_pages); dev->guest_pages = NULL; if (dev->log_addr) { munmap((void *)(uintptr_t)dev->log_addr, dev->log_size);...
1
Look into this code to determine if it is secure. static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { unsigned int pgnr; unsigned int maxlen; unsigned int pgoff; unsigned int pgend; void *kaddr; maxlen = xdr->buf->page_len; if (base >= maxlen) { base...
1
Review and verify if this code is vulnerable. makeOperatorDependencies(HeapTuple tuple, bool makeExtensionDep, bool isUpdate) { Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tuple); ObjectAddress myself, referenced; ObjectAddresses *addrs; ObjectAddressSet(myself, OperatorRelationId, oper...
1
Review and verify if this code is vulnerable. int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, struct sockaddr_storage *kern_address, int mode) { int tot_len; if (kern_msg->msg_namelen) { if (mode == VERIFY_READ) { int err = move_addr_to_kernel(kern_msg->msg_name, kern_...
1
Test and validate this code for security flaws. HiiDrawImage ( IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_DRAW_FLAGS Flags, IN CONST EFI_IMAGE_INPUT *Image, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN ...
1
Investigate whether this code has any weaknesses. static inline bool f2fs_is_multi_device(struct f2fs_sb_info *sbi) { return sbi->s_ndevs > 1; }
0
Audit this code for any potential security threats. sigend_check(__attribute__((unused)) void *v, __attribute__((unused)) int sig) { if (master) thread_add_start_terminate_event(master, start_checker_termination_thread); }
0
Examine and determine whether this code contains vulnerabilities. cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h, const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn, const cdf_directory_t **root) { size_t i; const cdf_directory_t *d; *root = NULL; for (i = 0; i < dir->dir_l...
0
Examine and determine whether this code contains vulnerabilities. static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 4, &tmp)) return -1; *val = (tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) & 0x7fffffff) + 1))) : JAS_CAST(longlong, tmp); return 0;...
1
Examine this code to see if it is at risk of exploitation. rsvg_new_tref (void) { RsvgNodeTref *text; text = g_new (RsvgNodeTref, 1); _rsvg_node_init (&text->super); text->super.set_atts = _rsvg_node_tref_set_atts; text->link = NULL; return &text->super; }
1
Examine this code to see if it is at risk of exploitation. MonCapParser() : MonCapParser::base_type(moncap) { using qi::char_; using qi::int_; using qi::ulong_long; using qi::lexeme; using qi::alnum; using qi::_val; using qi::_1; using qi::_2; using qi::_3; using qi::eps; ...
1
Check and analyze this code for any security issues. static void TIFFGetProfiles(TIFF *tiff,Image *image,ExceptionInfo *exception) { uint32 length; unsigned char *profile; length=0; #if defined(TIFFTAG_ICCPROFILE) if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) && (profile != ...
1