summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-10-20whitespacedjm1-3/+3
2014-10-20correct spacing *after* inline equations (much simpler than expected)schwarze2-2/+6
2014-10-20unifdef -DHAS_REGEXP -DHAS_PASSWD_MAPS -DHAS_FILE_MAPS \guenther23-533/+24
-DHAS_NIS_MAPS -DHAS_NIS_RELOAD -DRPC_4 -DHAS_UNION_MAPS \ -DHAS_TCP_NFS -DOS_HAS_NDBM -DNFS_PROTOCOL_VERSION=3 \ -DNFS_ARGS_NEEDS_PATH -DPRECISE_SYMLINKS -DHAS_EMPTY_AUTOMOUNTS \ -DNEED_MNTOPT_PARSER -DSHORT_MOUNT_NAME -DHAS_NFS_QUALIFIED_NAMES \ -UUPDATE_MTAB -UFIXUP_MNTENT -UMNTENT_HDR -UMNTINFO_DEV \ -UMNTOPT_COMPRESS -UMNTOPT_NQNFS -UINFORM_MOUNTD \ -USUNOS4_WORKAROUND -UULTRIX_HACK ok deraadt@
2014-10-20correct spacing before inline equationsschwarze5-16/+16
2014-10-20s_client: don't call shutdown on a non-existent socket descriptor.bcook1-3/+1
from Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> ok beck@, deraadt@
2014-10-20show the {MDOC,MAN}_EQN node, it contains interesting information,schwarze1-11/+13
in particular line and column numbers and flags; but hide the uninteresting EQN_ROOT box
2014-10-20typo; deraadttedu1-2/+2
2014-10-20replace bzeros after allocations with M_ZERO and PR_ZERO as appropriate.dlg1-9/+4
ok deraadt@
2014-10-20use SHA512 to hash entropy instead of MD5tedu1-15/+15
2014-10-20unconditionally build sha2 so we can use it in all the kernels.tedu1-2/+2
2014-10-20Start removing portability goo: we have syslog(), strerror(), POSIX regexp,guenther129-11256/+95
BSD-style getmntinfo(), BSD signals, 4.4BSD unmount(), etc Delete configurations for other OSes Delete fsinfo and mk-amd-map, as we don't build them. ok deraadt@
2014-10-19make RETURN VALUES more conciseschwarze1-77/+28
and fix two instances of "new sentence, new line" while here feedback and ok jmc@, ok doug@
2014-10-19Move the description of mg automatic recentering further down thelum1-12/+11
tutorial, next to the C-l (recenter) command description. This also removes confusion if you read the tutorial on a screen larger than 24 lines. Input jmc@ ok florian@
2014-10-19rearrange -d, again, after giving ingo some dodgy advice;jmc2-4/+4
ok ingo
2014-10-19Revamp malloc.3 by reordering the sections and rewriting parts.doug1-185/+417
The old man page had a lot of useful information, but it was all mixed together which made it difficult to reference. The main theme in this commit is that the sections are more focused: * DESCRIPTION describes the overall behavior * RETURN VALUES describes what it may return (including implementation defined values) * EXAMPLES shows why we recently started an audit on malloc and realloc usage in the tree. * Added CAVEATS which describes what is implementation defined, gotchas and security implications of misusing these functions * Added IDIOMS which describes how these functions should or should not be used The MALLOC_OPTIONS section was left unchanged. Function names were added to DIAGNOSTICS and STANDARDS. The MALLOC_OPTIONS and DIAGNOSTICS sections were pushed down in the page so more pertinent information is higher up. This has gone through several revisions thanks to input from deraadt@ and schwarze@. Ingo also helped with some of the mandoc formatting. OK schwarze@ (as far as it is a good starting point and the code snippets look ok)
2014-10-19More gracefully handle firmware loading errors in ulpt(4).stsp1-3/+14
The previous lack of error handling could trigger a kernel crash in some situations, with ulptwrite being called while not ready. ok deraadt phessler
2014-10-19in usage() and SYNOPSIS, sort options as suggested by jmc@schwarze2-5/+5
2014-10-19Revert last commit due to changed semantics found by make release.doug2-17/+17
2014-10-19Use sc_if->sk_pktlen to specify the maximum DMA transfer size and maximumbrad1-3/+3
DMA segment size when setting up the TX buffers in msk_init_tx_ring(). ok jsg@
2014-10-18Don't use %r1 to refer to bit 1. No binary difference.kettenis2-4/+4
2014-10-18Remove some #ifdef from libevent.bluhm4-36/+7
OK nicm@
2014-10-18Better POSIX compliance in realpath(3).doug2-17/+17
millert@ made changes to realpath.c based on FreeBSD's version. I merged Todd's changes into dl_realpath.c. ok millert@, guenther@
2014-10-18Fix description of Ss and Se.nicm1-7/+5
2014-10-18Whitespace.uebayasi1-43/+43
2014-10-18Make sure the direct map isn't executable on hardware that allows us to do so.kettenis1-2/+2
Enforcing W^X in the kernel like this mitigates at least some ret2dir attacks. ok mlarkin@, deraadt@
2014-10-18None of these need to include <openssl/rand.h>jsing62-128/+62
2014-10-18Sort/group includes.jsing2-50/+52
2014-10-18Remove the remaining #ifdef HAVE_ and the #define _GNU_SOURCE.bluhm6-38/+7
OK nicm@
2014-10-18Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().jsing34-130/+76
arc4random provides high quality pseudo-random numbers, hence there is no need to differentiate between "strong" and "pseudo". Furthermore, the arc4random_buf() function is guaranteed to succeed, which avoids the need to check for and handle failure, simplifying the code. It is worth noting that a number of the replaced RAND_bytes() and RAND_pseudo_bytes() calls were missing return value checks and these functions can fail for a number of reasons (at least in OpenSSL - thankfully they were converted to wrappers around arc4random_buf() some time ago in LibreSSL). ok beck@ deraadt@ miod@
2014-10-18plug file descriptor leaks on read or write failure;schwarze2-16/+15
hinted at by Steffen Nurpmeso <sdaoden at yandex dot com>.
2014-10-18oops, too greedymiod1-2/+2
2014-10-18Don't assume that ep_taddr and ep_daddr are page-aligned. It is possible tokettenis1-5/+7
construct ELF executables for which ep_daddr ends up not being properly aligned. Sanitize the addresses before setting up the address space for the new executable. Should fix the panic discovered by Alejandro Hernandez. ok miod@
2014-10-18Mention -fstack-shuffle is a gcc4-only thing, but gets silently ignored bymiod1-4/+7
gcc3. Reminded by zhuk@
2014-10-18Remove even more unnecessary `needs-flag' attributes from config machinery,miod10-25/+24
as well as useless include of the generated flag files.
2014-10-18syncjasper1-1/+0
2014-10-18Add VIDIOC_G_INPUT ioctl, some ports need it (at least ffmpeg)armani4-5/+24
ok ratchov@, sthen@, mpi@
2014-10-18enable the sinclude/-include feature support I wrote long ago.espie1-2/+2
Other systems now have it, xenocara is using it. talked over with kettenis@ who checked release still works. I did a full bulk build with this and did not notice any issue.
2014-10-18Use reallocarray()deraadt2-10/+7
ok doug
2014-10-18reallocarray() -- a little tricky to reviewderaadt1-3/+3
ok doug millert
2014-10-18Convert some malloc() and realloc() calls to reallocarray().doug1-8/+10
ok deraadt@
2014-10-18Simple malloc() to reallocarray() conversion.doug1-3/+3
ok deraadt@
2014-10-18Simple malloc() to reallocarray().doug1-2/+2
ok deraadt@
2014-10-18Simple malloc() to reallocarray() conversion to potentially avoid integerdoug1-5/+9
overflow. ok deraadt@
2014-10-18Convert malloc() with a size var using multiplication to reallocarray().doug1-5/+6
Avoid assigning the size unless reallocarray() succeeds to avoid overflow. ok deraadt@
2014-10-18Typical malloc() with size multiplication to reallocarray().doug3-12/+12
ok deraadt@
2014-10-17Remove #ifdef HAVE_backend and remove references to unimplementedbluhm2-36/+3
backends. OK nicm@
2014-10-17trivial sync of the first sentence of the DESCRIPTIONschwarze1-4/+4
with btree(3) and recno(3); from jean-philippe at ouellet dot biz
2014-10-17Correctly encode half line feed in the output stream for -f;schwarze1-2/+2
this patch only changes two bits, note that '\011' != '9' == '\071'. Bug introduced by the original author, Michael Rendell, and committed by Keith Bostic on May 22, 1990 (CSRG SCCS rev. 5.1). The following operating systems are affected: 4.3BSD Reno, BSD Net/2, 4.4BSD, 4.4BSD Lite1, 4.4BSD Lite2, and all versions of 386BSD, NetBSD, OpenBSD, FreeBSD, DragonFly, Debian GNU/Linux (package bsdmainutils) and probably many others. "that's a fun one" millert@, "nice find" deraadt@
2014-10-17Partial revert of rev. 1.7 (Nov. 21, 2000):schwarze1-10/+10
The half line feed escape codes are decimal 8 and 9 (octal 010 and 011). While here, make it clear that the numbers are ASCII, and consistently use lower cases character names in the first column and decimal numbers in the parentheses at the end of the second column. OK millert@
2014-10-17Remove some #ifdef HAVE_syscall.bluhm3-45/+3
OK nicm@