summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-03-16Add SDF_DYING checks to more functions in scsi disk, to prevent anbluhm1-5/+15
use after free of the scsi link structure during detach. OK krw@
2016-03-16Prefer fseek(3) over rewind(3) since the latter although it also calls fseekmestre5-11/+19
then additionally it calls clearerr(3) deliberately but we want to catch any error that may happen and this way we couldn't catch it OK tb@
2016-03-16- Check if user running spamlogd(8) has root privileges and if not then stopmestre1-8/+9
program early - #define SPAMD_USER "_spamd" and use it on getpwnam(3) call - Set usage() as __dead void - Remove lint-style comments OK beck@
2016-03-16if ticks diverge from ifq_congestion too far the diff will go negativedlg1-2/+9
detect this and bump ifq_congestion forward rather than claim the system is congested for a long period of time. ok mpi@ henning@ jmatthew@
2016-03-16macros for the null, min, and max vlan ids.dlg1-2/+6
ok mpi@ and tweaks from sthen@
2016-03-16There's no reason to have execute permissions on a file system image.natano1-2/+2
ok millert
2016-03-16knock out unused Pp in previous;jmc1-2/+1
2016-03-16Expose new audio ioctls that do one thing only: start and stop DMA,ratchov4-5/+282
set and get parameters. This is much simpler. ok semarie, armani, tweaks from jmc
2016-03-16syncderaadt1-0/+9
2016-03-16Fix a typo in comment. Diff from Yuuichi Someya.yasuoka1-2/+2
2016-03-16remove cpp version of __sputc, since the inline version is all we havederaadt1-15/+1
ever used. ok jsg
2016-03-16Transition to "Req-Sent" had been missing when RTA in "Opened". This causedyasuoka1-1/+2
a timer event leak. Diff from Yuuichi Someya.
2016-03-16Wrap a macro's args in parentheses. No binary change.mmcc1-2/+2
I'm discussing with deraadt@ whether it's a good idea to convert some of these to functions. The one changed by this commit probably isn't eligible because it defines only a for loop's condition, but many others in less(1) should probably be converted. ok millert@
2016-03-15'accomodate' -> 'accommodate' in comments.krw19-37/+37
Started by diff from Mical Mazurek.
2016-03-15execl(3) calls must have the last argument casted to (char *)NULLmestre2-6/+6
At the time when this was commited me and tb@ discussed that it shouldn't be changed, but still snucked in within a larger diff that we didn't notice. OK tb@
2016-03-15Update to tzdata2016b from ftp.iana.org.millert9-362/+506
2016-03-15Don't warn about valid time zone abbreviations. POSIX through 2000millert2-34/+13
says that an abbreviation cannot start with ':', and cannot contain ',', '-', '+', NUL, or a digit. POSIX from 2001 on changes this rule to say that an abbreviation can contain only '-', '+', and alphanumeric characters from the portable character set in the current locale. To be portable to both sets of rules, an abbreviation must therefore use only ASCII letters." Adapted from tzcode2015f. OK deraadt@ mestre@
2016-03-15remind people rewind is seldom a good choiceespie1-2/+5
okay jmc@
2016-03-15Allocate amap slots for a virtual memory range reserved with sbrk lazily.stefan1-2/+2
This avoids wasting kernel memory if the user process does not make use of the allocated memory. Testing by sthen@ and tobiasu@, thanks! ok deraadt@
2016-03-15For amaps with only a few slots, allocate the slots via pool(9)stefan1-13/+57
This saves some memory compared to using malloc, because there's no roundup to the next bucket size. And it reduces kmem pressure at least for some architectures (e.g. amd64). Testing by sthen@ and tobiasu@, thanks! ok sthen@ deraadt@
2016-03-15not compiled before commitderaadt1-2/+2
2016-03-15Fix size passed to free(), found the hard way by Nick Permyakovjca1-2/+2
ok deraadt@
2016-03-15Ethernet drivers no longer need to include if_vlan_var.h for the VLANnaddy7-27/+7
definitions; ok mpi@
2016-03-15pledge: wl_paths: resolvpath() logic errorsemarie1-64/+73
prepend chroot value *after* canonization and not before.
2016-03-15pledge: wl_paths: corrects a memory leak in error code path and an evaluationsemarie1-2/+4
order ("a += b > c" is the same as "a += (b > c)" which is wrong here) ok jca@
2016-03-15usbd_is_dying() can't be part of the common rtwn(4) driver code once westsp3-42/+99
merge code from urtwn(4). So timeouts must move back to the bus-specific part of the driver. ok mpi@
2016-03-15Exar XR17V354 puc(4) device, "high speed quad uart".mlarkin1-1/+12
2016-03-15syncmlarkin2-5/+5
2016-03-15Typo in part number in previous commit (fix Exar P/N from XR17C354 tomlarkin1-2/+2
XR17V354)
2016-03-15syncmlarkin2-2/+2
2016-03-15syncmlarkin2-0/+5
2016-03-15Add Exar 4 port PCIe serial port (puc)mlarkin1-1/+2
2016-03-15spelling fix;jmc1-2/+2
2016-03-15 o remove legacy code that defines abs(3) if it isn't availablemmcc2-14/+32
o inline an ugly and potentially risky macro of the form: #define x if (a) b; else o fix a >21 y.o. bug resulting from someone writing: puts("[nothing to parse], stdout"); when they meant: fputs("[nothing to parse]", stdout); ok canacar@
2016-03-15Remove now unused legacy uiomovei() function.stefan5-31/+8
All its callers got reviewed and converted to use uiomove() properly. ok deraadt@
2016-03-15 o clean up a little whitespace and formattingmmcc5-32/+33
o move some declarations out of hexdump.h o mark some declarations as __dead or static from Michal Mazurek, with input from and ok tb@
2016-03-15Burn more LDT deadwood: stop allocating one for each idle thread,guenther10-92/+29
load the ldt register with the null selector (disabling use of it), stop reloading it on every context switch, and blow away the table itself, as well as the pcb and pmap bits that were used to track it (making sure to keep pcb_savefpu correctly aligned). testing naddy@ ok kettenis@ mpi@ mlarkin@
2016-03-15Replace two malloc casts that deraadt@ and I removed over the past yearmmcc1-2/+2
or two. Upstream wants to keep them for C++ support, and it isn't worth maintaining a larger diff. No binary change. Upstream commit: https://github.com/fanf2/unifdef/commit/87dfd91 I'll send more merging diffs to tech@ soon.
2016-03-14Change a bunch of (<blah> *)0 to NULL.krw37-119/+119
ok beck@ deraadt@
2016-03-14some Xr; from michal mazurekjmc2-4/+8
2016-03-14fix word issue, as reported by hansjmc1-2/+2
2016-03-14Expose snprintf() and vsnprintf() for XPG 5. It predates C99 butmillert1-6/+9
still specified snprintf() and vsnprintf() based on earlier drafts. Allows snprintf() and vsnprintf() to be used when _XOPEN_SOURCE is defined as 500. OK guenther@
2016-03-14Replace an ad-hoc implementation of opendev(), with said function andnatano3-63/+30
open the device only once with the correct flags, instead of twice (one file handle for reading and one for writing). Committing this at once because the changes are interrelated. ok stefan
2016-03-14Add a missing "cpath" promise; newfs_ext2fs can create files when usednatano1-2/+2
with the -F and -s flags. ok stefan
2016-03-14Convert sparc drivers bpp and magma to uiomovestefan4-19/+19
Compile test and ok tobiasu@
2016-03-14small step towards multiple pools: move two globls into the struct dir_infootto1-112/+126
ok @stefan armani@
2016-03-14unbreak authentication using lone certificate keys in ssh-agent:djm1-6/+2
when attempting pubkey auth with a certificate, if no separate private key is found among the keys then try with the certificate key itself. bz#2550 reported by Peter Moody
2016-03-14zdump(8) needs to read files so it needs pledge(2) rpath promisemestre1-2/+2
After discussion with tb@, deraadt@ and millert@, this was also OK'ed by them
2016-03-14Remove doaccess variable and access(2) call since this interfers withmestre1-11/+2
applications like zdump(8) because pledge(2) doesn't allow access(2) to /usr/share/zoneinfo. millert@ better described why this call can go away: "This looks like an attempt to do access checks based on the real uid instead of the effective uid. Basically for setuid programs we don't want to allow a user to set TZ to a path they should not be able to otherwise access. However, we already have a check for issetugid() above so I think the doaccess bits can just be removed and we can rely on open()." After discussion with tb@, deraadt@ and millert@, this was also OK'ed by them
2016-03-14(char *)0 -> NULLmmcc1-2/+2