summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/system.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-04-21KNF.jsing10-3942/+4184
2014-04-21improve realloc/calloc/malloc patterns; ok guentherderaadt32-96/+46
2014-04-21Delete #if 0'd time related functions which are totally expired.deraadt4-148/+0
No point even seeing these when we do the 2038 audit later on...
2014-04-21modernize malloc callderaadt2-2/+2
2014-04-21Replace entire printf-like guts with calls to libc snprintf.deraadt2-1538/+92
funopen(3) is used to interface to BIO descriptors. ok guenther
2014-04-21Bring malloc/calloc/realloc sequences to modern standardderaadt16-54/+38
ok guenther
2014-04-21remove macros wrapping malloc/calloc/free/reallocderaadt1-26/+16
2014-04-21Correctly document the return value of getenv(3)guenther1-6/+8
From Ben Cornett (ben (at) lantern.is)
2014-04-21KNF.jsing16-1096/+912
2014-04-21clean up files we don't needtedu38-2704/+0
2014-04-21fix accidentally deleted deref.beck2-2/+2
2014-04-20ASN1_STRING cleanup - realloc has handled NULL since I had a mulletbeck2-34/+20
and parachute pants - and since it's obvious there is no guarantee the caller doesn't pass in the data area in the argument, use memmove instead of memcpy so overlapping areas are handled correctly. Also, pointers can be usefully printed in hex with %p, in error messaeges rather than the bizzaro stuff that was there using mystical buffer lengths and abuse of strlcpy-converted-blindly-from-strcpy
2014-04-20replace a bunch of pointer-arithmatic-strcpy-converted-blindly-to-strlcpybeck2-14/+14
cruft with an snprintf. "better than what was there" ok guenther@
2014-04-20Eliminate duplicated logic by switching from malloc+snprintf to asprintfguenther2-40/+28
ok beck@
2014-04-20Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.guenther2-22/+36
APIs that pass times as longs will have to change at some point... Bump major on both libcrypto and libssl. ok tedu@
2014-04-20Restore beck's (void)snprintf(): they were reviewed.guenther6-10/+10
2014-04-20Restore beck's rev 1.8: snprintf() was reviewed.guenther2-4/+4
2014-04-20Restore tedu's rev 1.4: snprintf() was reviewed.guenther2-2/+2
2014-04-20Restore beck's rev 1.7: snprintf() was reviewed.guenther2-4/+8
Also, use sizeof() for snprintf()'s size argument
2014-04-20Remove unused/never installed libssl tools and docs and references to themafresh120-1267/+17
Sure deraadt
2014-04-20Restore beck's rev 1.21: snprintf() was reviewedguenther2-2/+2
2014-04-20theo found a file we don't seem to need, but just in case, i will pastetedu2-6/+0
the contents below: #!/usr/local/bin/perl # x86 assember
2014-04-20Restore beck's rev 1.9: snprintf() was reviewedguenther2-2/+2
2014-04-20KNF.jsing10-476/+610
2014-04-20Restore beck's rev 1.3: snprintf() was reviewedguenther2-2/+2
2014-04-20More KNF.jsing4-6/+6
2014-04-20KNF.jsing12-1428/+1902
2014-04-20KNF.jsing12-940/+1184
2014-04-20KNF.jsing8-528/+718
2014-04-20More KNF.jsing26-160/+176
2014-04-20More KNF.jsing2-100/+124
2014-04-20gettimeofday() is portable enough and does not need a wrapperderaadt2-18/+4
2014-04-20calloc() rather than malloc+memsetderaadt2-4/+4
2014-04-20Fix indentation, adding braces and combining a nested if to reduce depthguenther2-24/+28
2014-04-20KNF.jsing4-362/+438
2014-04-20KNF.jsing8-796/+786
2014-04-20Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.guenther17-118/+44
APIs that pass times as longs will have to change at some point... Bump major on both libcrypto and libssl. ok tedu@
2014-04-20return after error instead of plowing ahead. noticed by mancha1 at zohotedu2-0/+2
2014-04-20Use calloc(a,b) instead of malloc(a*b) + memset(a*b). I don't know ifderaadt2-4/+2
this instance is integer-overflowable, but we cannot keep hand-auditing every instance (or apathetically ignoring these issues) when the simple calloc idiom is better in the presence of a good calloc(). It is simply unfeasible to always enter correct range checks before the aggregate size calculation, just go find some 4000 lines of code, REPAIR THEM ALL, then come back and tell me I am wrong. This only works on systems where calloc() does the integer overflow check, but if your system doesn't do this, you need to ask your vendor WHY THEY ARE 10 YEARS BEHIND IN BEST PRACTICE? This is the kind of problem that needs to be solved at the right layer. malloc integer-overflow was implicated in the 2002 OpenSSH hole. OpenSSH and much other code is now written to use calloc(), for instance OpenSSH has 103 calls to it. We feel safer with our use of calloc(). It is a natural approach for us to use calloc(). How safe do you feel on systems which lack that range check in their calloc()? Good writeup from 2006: http://undeadly.org/cgi?action=article&sid=20060330071917
2014-04-20Undo a calloc() replacement. It lacks the integer overflow check thatderaadt1-14/+1
the system one has.
2014-04-20KNF.jsing24-2308/+2268
2014-04-20reset imprint to NULL to avoid double free. from mancha1 at zohotedu2-0/+2
2014-04-19release buffers fix was lost in merge. put it back.tedu2-2/+4
2014-04-19change some rsh references to ssh. poke by jmctedu2-9/+9
2014-04-19More KNF.jsing4-74/+84
2014-04-19More KNF.jsing6-90/+122
2014-04-19another attempt at fixing stale x509 data. since we don't know where thetedu2-20/+16
initial storage came from, we can't free it. just memset in the sequence case. probably ok beck
2014-04-19More KNF.jsing14-157/+163
2014-04-19More KNF.jsing2-40/+40
2014-04-19tweak previous;jmc1-3/+2