| /xnu-10063.101.15/libkern/os/ |
| H A D | overflow.h | 60 #define os_mul_overflow(a, b, res) __os_warn_unused(__builtin_mul_overflow((a), (b), (res))) macro 88 _s = os_mul_overflow((a), (b), &_tmp); \ 89 _t = os_mul_overflow((c), _tmp, (res)); \ 98 _t = os_mul_overflow((x), _tmp, (res)); \ 106 _s = os_mul_overflow((a), (x), &_tmp); \
|
| /xnu-10063.101.15/libkern/libkern/c++/ |
| H A D | safe_allocation.h | 216 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 234 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) {
|
| H A D | bounded_ptr.h | 394 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) { 414 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) {
|
| /xnu-10063.101.15/iokit/DriverKit/ |
| H A D | safe_allocation.h | 216 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 234 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) {
|
| H A D | bounded_ptr.h | 394 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) { 414 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) {
|
| /xnu-10063.101.15/bsd/kern/ |
| H A D | kern_core.c | 496 if (os_mul_overflow(segment_count, segment_command_sz, &lhs)) { in coredump() 517 if (os_mul_overflow(notes_count, sizeof(struct note_command), ¬es_size)) { in coredump()
|
| H A D | kern_trustcache.c | 1044 if (os_mul_overflow(tc_offsets->num_caches, sizeof(uint32_t), &offsets_length)) { in load_static_trust_cache()
|
| H A D | sysv_shm.c | 1059 if (os_mul_overflow(shminfo.shmmni, sizeof(struct shmid_kernel), &sz)) { in shminit()
|
| H A D | kdebug.c | 1515 if (os_mul_overflow(nthreads, sizeof(kd_threadmap), mapsize)) { in _thread_map_create_live() 1925 if (os_mul_overflow(map_count, sizeof(kd_threadmap), &map_size)) { in _write_legacy_header()
|
| H A D | kern_event.c | 1448 if (os_mul_overflow((uint64_t)kev->ext[1], multiplier, &leeway_ns)) { in filt_timervalidate() 1468 if (os_mul_overflow((uint64_t)kev->data, multiplier, &calendar_deadline_ns)) { in filt_timervalidate() 1540 if (os_mul_overflow((uint64_t)kev->data, multiplier, &interval_ns)) { in filt_timervalidate() 8969 if (os_mul_overflow(sizeof(kqueue_id_t), buflen, &bufsize)) { in kevent_copyout_proc_dynkqids() 9015 if (os_mul_overflow(sizeof(kqueue_id_t), MIN(buflen, nkqueues), ©size)) { in kevent_copyout_proc_dynkqids()
|
| H A D | kern_aio.c | 1049 os_mul_overflow(sizeof(user_addr_t), uap->nent, &aiocbpp_size)) { in aio_suspend_nocancel()
|
| H A D | proc_info.c | 1703 if (os_mul_overflow(ncoals, elem_size, &k_buffersize)) { in proc_listcoalitions() 2956 if (os_mul_overflow(nuptrs, sizeof(uint64_t), ©size)) { in proc_pidlistuptrs()
|
| /xnu-10063.101.15/osfmk/kern/ |
| H A D | exclaves_inspection.c | 413 if (os_mul_overflow(page_count, PAGE_SIZE, &exclaves_stackshot_buffer_size)) { in exclaves_inspection_init()
|
| H A D | ledger.c | 134 if (os_mul_overflow(offset, sizeof(struct ledger_entry_small), &offset) || offset >= l->l_size) { in is_entry_valid() 226 …if (os_mul_overflow(lt_table_size, (sizeof(struct ledger_entry) / sizeof(struct ledger_entry_small… in ledger_template_entries_lut_size() 460 if (os_mul_overflow(old_cnt, 2, &new_cnt)) { in ledger_entry_add_with_flags()
|
| H A D | machine.c | 1484 if (os_mul_overflow(timeout, scale, &timeout)) { in machine_timeout_init_with_suffix()
|
| H A D | kern_cdata.c | 290 if (os_mul_overflow(num_items, KCDATA_ALIGNMENT_SIZE - 1, &max_padding_bytes)) { in kcdata_estimate_required_buffer_size()
|
| H A D | debug.c | 559 if (os_mul_overflow(carveouts[i].requested_size, 1024 * 1024, &temp_carveout_size)) { in phys_carveout_init()
|
| /xnu-10063.101.15/libsyscall/wrappers/spawn/ |
| H A D | posix_spawn.c | 993 if (os_mul_overflow(acts->pspa_alloc, 2, &newnum)) { in posix_spawn_growportactions_np() 1570 if (os_mul_overflow((*psactsp)->psfa_act_alloc, 2, &newnum)) { in _posix_spawn_file_actions_grow() 2307 if (os_mul_overflow(psmx->psmx_alloc, 2, &newnum)) { in posix_spawnattr_setmacpolicyinfo_np()
|
| /xnu-10063.101.15/bsd/net/classq/ |
| H A D | classq_fq_codel.c | 781 if (os_mul_overflow(fq_cl->fcl_stat.fcl_avg_qdelay, in fq_getq_flow()
|
| /xnu-10063.101.15/iokit/Kernel/ |
| H A D | IODeviceTreeSupport.cpp | 1105 if (__improbable(os_mul_overflow(gIODTResolvers->alloc, 2, in IODTSetResolving()
|
| /xnu-10063.101.15/osfmk/ipc/ |
| H A D | ipc_kmsg.c | 1799 } else if (os_mul_overflow(desc_count, USER_DESC_MAX_DELTA, &max_delta)) { in ipc_kmsg_alloc() 4655 if (os_mul_overflow(count, sizeof(mach_port_t), &ports_length)) { in ipc_kmsg_copyin_ool_ports_descriptor() 4660 if (os_mul_overflow(count, sizeof(mach_port_name_t), &names_length)) { in ipc_kmsg_copyin_ool_ports_descriptor()
|
| /xnu-10063.101.15/bsd/netkey/ |
| H A D | key.c | 2691 if (__improbable(os_mul_overflow(lft->sadb_lifetime_addtime, NSEC_PER_SEC, &lifetime_ns))) { in key_spdadd() 2699 if (__improbable(os_mul_overflow(lft->sadb_lifetime_usetime, NSEC_PER_SEC, &validtime_ns))) { in key_spdadd() 4621 if (__improbable(os_mul_overflow(sav->lft_h->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 4641 if (__improbable(os_mul_overflow(sav->lft_s->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 10138 if (os_mul_overflow(ipsec_sav_count + 1, sizeof(*sa_stats_sav), &bufsize)) { in key_getsastat()
|
| /xnu-10063.101.15/bsd/vfs/ |
| H A D | vfs_cluster.c | 384 if (__improbable(os_mul_overflow(max_io_size, io_scale, &prefetch) || in cluster_max_prefetch() 2881 if (__improbable(os_mul_overflow(max_upl_size, IO_SCALE(vp, 2), in cluster_write_direct() 4772 if (__improbable(os_mul_overflow(max_rd_size, IO_SCALE(vp, 2), in cluster_read_direct()
|
| H A D | vfs_cache.c | 3071 if (os_mul_overflow(dNodes, 2, &nelements)) { in resize_namecache()
|
| /xnu-10063.101.15/bsd/netinet/ |
| H A D | flow_divert.c | 3153 if (os_mul_overflow(sizeof(*new_trie.nodes), (size_t)nodes_count, &nodes_mem_size) || in flow_divert_handle_app_map_create() 3155 os_mul_overflow(sizeof(*new_trie.bytes), (size_t)bytes_count, &bytes_mem_size) || in flow_divert_handle_app_map_create()
|