openbsd
10 years agoRemove NULL pointer dereference, which jsg insists I not
blambert [Fri, 25 Apr 2014 11:12:14 +0000 (11:12 +0000)]
Remove NULL pointer dereference, which jsg insists I not
call a use-after free, from error path.

found by and ok jsg@

10 years agoRemove rti_ifp from rt_addrinfo, one less ifp pointer, say yay!
mpi [Fri, 25 Apr 2014 10:41:09 +0000 (10:41 +0000)]
Remove rti_ifp from rt_addrinfo, one less ifp pointer, say yay!

This pointer was only needed by rt_getifa() to find an address, so
turn it into a local variable.

ok henning@, bluhm@

10 years agoDo no reprobe for a supported protocol when enabling a pointing
mpi [Fri, 25 Apr 2014 10:33:36 +0000 (10:33 +0000)]
Do no reprobe for a supported protocol when enabling a pointing
device of type PMS_STANDARD, probing during autoconf(9) is enough!.

In such case, the device can be a simple PS/2 mouse, a unsupported
touchpad or a downgraded touchpad if something bad happened.  But
it is very unlikely that reprobing will improve the situation and
transform a standard mouse into a multitouch-aware touchpad ;)

This fixes the 12 seconds delay seen on various Dell laptops (E4310
and Latitude D630) when starting Xorg, reported by Kārlis Miķelsons
on bugs@.

ok stsp@, dcoppa@, shadchin@

10 years agotest dt_min for invalid minute values instead of testing dt_sec twice
jsg [Fri, 25 Apr 2014 09:49:33 +0000 (09:49 +0000)]
test dt_min for invalid minute values instead of testing dt_sec twice
ok bmercer@

10 years agoKill in_localaddr(), one less usage of the global list of IPv4 addresses.
mpi [Fri, 25 Apr 2014 09:44:38 +0000 (09:44 +0000)]
Kill in_localaddr(), one less usage of the global list of IPv4 addresses.

This function is used only once in our tree to optimize the size of the
MSS if the forward address correspond to a host on one of our subnets,
but only if ip.mutdisc is disable, which is not the default!

While here get rid of the "#ifdef RTV_MTU", it is here.

ok henning@, mikeb@, bluhm@

10 years agodon't access a pointer till after the null check
jsg [Fri, 25 Apr 2014 09:41:21 +0000 (09:41 +0000)]
don't access a pointer till after the null check
ok mikeb@

10 years agoSupport running user-defined actions on receipt of snmp traps.
blambert [Fri, 25 Apr 2014 06:57:11 +0000 (06:57 +0000)]
Support running user-defined actions on receipt of snmp traps.

testing sthen@
much man page guidance jmc@
ok reyk@

10 years agobe a bit clearer about what this page is; ok millert schwarze
jmc [Fri, 25 Apr 2014 06:31:48 +0000 (06:31 +0000)]
be a bit clearer about what this page is; ok millert schwarze

10 years agoRemove defined varibles that no longer do anything.
jsing [Fri, 25 Apr 2014 04:10:26 +0000 (04:10 +0000)]
Remove defined varibles that no longer do anything.

ok miod@

10 years agoUse const char *.
jsing [Fri, 25 Apr 2014 04:02:04 +0000 (04:02 +0000)]
Use const char *.

Suggested by miod@

10 years agoKNF fixes
lteo [Fri, 25 Apr 2014 03:38:59 +0000 (03:38 +0000)]
KNF fixes

10 years agoTry to clean the maze of <openssl/bn.h> defines regarding the BN internals.
miod [Thu, 24 Apr 2014 21:31:00 +0000 (21:31 +0000)]
Try to clean the maze of <openssl/bn.h> defines regarding the BN internals.

The intent of this change is to only keep support for two kind of architectures:
- those with 32-bit int and long, and 64-bit long long, where
  ``long * long -> long long'' multiplication routines are available.
- those with 64-bit int and long, and no 128-bit long long type.

This gets rid of the SIXTY_FOUR_BIT_LONG, SIXTY_FOUR_BIT (not the same!),
THIRTY_TWO_BIT, SIXTEEN_BIT and EIGHT_BIT defines.

After this change, the types and defines are as follows:

arch:           64bit           32bit           rationale
BN_LLONG        undefined       defined         defined if l * l -> ll
BN_ULLONG       undefined       u long long     result of BN_LONG * BN_LONG
BN_ULONG        u long          u int           native register size
BN_LONG         long            int             the same, signed
BN_BITS         128             64              size of 2*BN_ULONG in bits
BN_BYTES        8               4               size of 2*BN_ULONG in bytes
BN_BITS2        64              32              BN_BITS / 2

Tested on various 32-bit and 64-bit OpenBSD systems of various endianness.

10 years agoRe-add rcsid, and switch back to our previous descriptions for -iDsym[=value]
sthen [Thu, 24 Apr 2014 21:22:05 +0000 (21:22 +0000)]
Re-add rcsid, and switch back to our previous descriptions for -iDsym[=value]
and -iUsym which jmc and I find a bit easier to understand. ok jmc

10 years agosync
miod [Thu, 24 Apr 2014 21:07:37 +0000 (21:07 +0000)]
sync

10 years agoInstall separate more.1 instead of using a link from less.1.
millert [Thu, 24 Apr 2014 20:56:02 +0000 (20:56 +0000)]
Install separate more.1 instead of using a link from less.1.
Requested by jmc@

10 years agoFix indentation.
mcbride [Thu, 24 Apr 2014 20:44:49 +0000 (20:44 +0000)]
Fix indentation.

10 years agoBring back the SSL_OP_PKCS1_CHECK_* defines (defined to zero, as they already
miod [Thu, 24 Apr 2014 19:54:04 +0000 (19:54 +0000)]
Bring back the SSL_OP_PKCS1_CHECK_* defines (defined to zero, as they already
were), after stumbling upon code (mis)using them in the wild.

10 years agorearrange a bit of code/comments
tedu [Thu, 24 Apr 2014 19:38:22 +0000 (19:38 +0000)]
rearrange a bit of code/comments

10 years agocombine some notes in STANDARDS for consistency;
jmc [Thu, 24 Apr 2014 19:19:28 +0000 (19:19 +0000)]
combine some notes in STANDARDS for consistency;

10 years agodocument the new makewhatis(8)/apropos(1) database format;
schwarze [Thu, 24 Apr 2014 19:08:01 +0000 (19:08 +0000)]
document the new makewhatis(8)/apropos(1) database format;
original idea to have some documentation about this by espie@;
ok jmc@

10 years agono more kinit(1);
jmc [Thu, 24 Apr 2014 19:07:54 +0000 (19:07 +0000)]
no more kinit(1);

10 years agojmc spotted more ruptime tentacles
tedu [Thu, 24 Apr 2014 19:04:54 +0000 (19:04 +0000)]
jmc spotted more ruptime tentacles

10 years agouses ssh these days, not rsh; ok tedu
jmc [Thu, 24 Apr 2014 18:56:24 +0000 (18:56 +0000)]
uses ssh these days, not rsh; ok tedu

10 years agono more rwho/ruptime;
jmc [Thu, 24 Apr 2014 18:52:11 +0000 (18:52 +0000)]
no more rwho/ruptime;

10 years agounifdef MSDOS
giovanni [Thu, 24 Apr 2014 18:35:25 +0000 (18:35 +0000)]
unifdef MSDOS
ok miod@

10 years agoobvious use after free was less obviously not a use after free.
tedu [Thu, 24 Apr 2014 17:13:11 +0000 (17:13 +0000)]
obvious use after free was less obviously not a use after free.
who uses '\0' as a null pointer constant? fix my mistake and restore
original semantics.

10 years agoFix logic inversion when checking environment variables on the
millert [Thu, 24 Apr 2014 16:29:48 +0000 (16:29 +0000)]
Fix logic inversion when checking environment variables on the
command line against the blacklist.  This is only a problem when
env_reset is disabled.  CVE 2014-0106

10 years agoMore KNF.
jsing [Thu, 24 Apr 2014 15:50:02 +0000 (15:50 +0000)]
More KNF.

10 years agono need to check for default_chip_map twice in one if statement
jsg [Thu, 24 Apr 2014 15:38:25 +0000 (15:38 +0000)]
no need to check for default_chip_map twice in one if statement

10 years agoMake it compile again.
jsing [Thu, 24 Apr 2014 15:38:13 +0000 (15:38 +0000)]
Make it compile again.

10 years agoRemove some malloc/strlcpy/strlcat horror. Just use asprintf and avoid an
jsing [Thu, 24 Apr 2014 15:12:20 +0000 (15:12 +0000)]
Remove some malloc/strlcpy/strlcat horror. Just use asprintf and avoid an
unchecked malloc at the same time.

ok beck@

10 years agoregen
aoyama [Thu, 24 Apr 2014 15:09:35 +0000 (15:09 +0000)]
regen

10 years agoadd ERR_asprintf_error_data, A tool to be used to get rid of the far too
beck [Thu, 24 Apr 2014 15:07:20 +0000 (15:07 +0000)]
add ERR_asprintf_error_data, A tool to be used to get rid of the far too
frequent construct of 30 lines of pointer and strlcat insanity followed
by an ERR_add_error_data. I will sweep through here like a chubby mongol
horde in the next few days pillaging crappy ERR_add_error_data's.
Oh and while we're at it fix the nasty vdata function to use something less
hard on the eyes.
ok jsing@

10 years agorm rwhod tentacles
tedu [Thu, 24 Apr 2014 15:05:10 +0000 (15:05 +0000)]
rm rwhod tentacles

10 years agorm rwho xr
tedu [Thu, 24 Apr 2014 15:03:04 +0000 (15:03 +0000)]
rm rwho xr

10 years agoI have not eaten for days.
tedu [Thu, 24 Apr 2014 15:01:27 +0000 (15:01 +0000)]
I have not eaten for days.
And who says you will?

10 years agoregen
aoyama [Thu, 24 Apr 2014 15:01:12 +0000 (15:01 +0000)]
regen

10 years agoThat is strength, boy! That is power! What is steel compared to the hand
tedu [Thu, 24 Apr 2014 14:59:06 +0000 (14:59 +0000)]
That is strength, boy! That is power! What is steel compared to the hand
that wields it? Look at the strength in your body, the desire in your
heart, I gave you this! Such a waste. Contemplate this on the tree of woe.

10 years agodays since rwhod was useful: 5475
tedu [Thu, 24 Apr 2014 14:55:39 +0000 (14:55 +0000)]
days since rwhod was useful: 5475

10 years agoAdd pcex{mem,io} entries to MAKEDEV.
aoyama [Thu, 24 Apr 2014 14:52:09 +0000 (14:52 +0000)]
Add pcex{mem,io} entries to MAKEDEV.

ok miod@

10 years agoremove kerberos reference, and knock some fairly useless Xr out;
jmc [Thu, 24 Apr 2014 14:14:08 +0000 (14:14 +0000)]
remove kerberos reference, and knock some fairly useless Xr out;

10 years agoYou want signals?!? I'll give you signals!!! Oh, and we have termios as
jsing [Thu, 24 Apr 2014 14:03:38 +0000 (14:03 +0000)]
You want signals?!? I'll give you signals!!! Oh, and we have termios as
well...

ok beck@

10 years agosimpler description for -P, avoiding the need to discuss rsh;
jmc [Thu, 24 Apr 2014 14:00:35 +0000 (14:00 +0000)]
simpler description for -P, avoiding the need to discuss rsh;

10 years agono more asn1 or comm_err;
jmc [Thu, 24 Apr 2014 13:48:38 +0000 (13:48 +0000)]
no more asn1 or comm_err;

10 years agoadjust some list widths;
jmc [Thu, 24 Apr 2014 13:41:39 +0000 (13:41 +0000)]
adjust some list widths;

10 years agoMore KNF.
jsing [Thu, 24 Apr 2014 13:12:18 +0000 (13:12 +0000)]
More KNF.

10 years agoMore KNF, things that couldn't be verified with md5(1), and some whitespace
mcbride [Thu, 24 Apr 2014 13:06:52 +0000 (13:06 +0000)]
More KNF, things that couldn't be verified with md5(1), and some whitespace
I missed on the first go around.

10 years agounifdef -U LINT
jsing [Thu, 24 Apr 2014 12:39:02 +0000 (12:39 +0000)]
unifdef -U LINT

10 years agoWhen OPENSSL_C is not defined, apps_startup becomes a
jsing [Thu, 24 Apr 2014 12:22:22 +0000 (12:22 +0000)]
When OPENSSL_C is not defined, apps_startup becomes a
signal(SIGPIPE, SIG_IGN) and apps_shutdown is a no-op. So just do that
instead.

ok beck@

10 years agoKNF
mcbride [Thu, 24 Apr 2014 12:21:26 +0000 (12:21 +0000)]
KNF

10 years agoRemove more FIPS tenticles.
jsing [Thu, 24 Apr 2014 12:19:59 +0000 (12:19 +0000)]
Remove more FIPS tenticles.

ok beck@

10 years agoRip a bunch of ifdefs from speed. We know we can fork, have SIGALRM and
jsing [Thu, 24 Apr 2014 12:04:31 +0000 (12:04 +0000)]
Rip a bunch of ifdefs from speed. We know we can fork, have SIGALRM and
do not use lint.

ok miod@

10 years agoewps... repair qid assignment
henning [Thu, 24 Apr 2014 11:55:12 +0000 (11:55 +0000)]
ewps... repair qid assignment

10 years agoChange the usbd_*_report() family of functions to take a usbd_device
mpi [Thu, 24 Apr 2014 09:40:28 +0000 (09:40 +0000)]
Change the usbd_*_report() family of functions to take a usbd_device
and a infaceno argument instead of an iface pointer.  While here,
remove some unused functions and inlined usbd_read_report_desc since
it is used only once.

This is part of plumbing required to convert the various USB HID devices
to handle multiples report IDs.

ok andre@

10 years agoThere is no longer a need for a paste_stack struct or for global_buffers
nicm [Thu, 24 Apr 2014 09:14:43 +0000 (09:14 +0000)]
There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.

10 years agoThe switch statement given/when was introduced in Perl 5.10 and got
bluhm [Thu, 24 Apr 2014 09:05:10 +0000 (09:05 +0000)]
The switch statement given/when was introduced in Perl 5.10 and got
experimental in Perl 5.18.  So we see warnings in the tests.
given is experimental at funcs.pl line 62.
when is experimental at funcs.pl line 63.
Just suppress this type of warnings for now.  If Perl will disable
smart match, the simple regression code still works.  If they will
choose to remove given/when, we can fix it later.
Discussed with and OK andre@ afresh1@

10 years agofix copied text in error string
blambert [Thu, 24 Apr 2014 08:51:08 +0000 (08:51 +0000)]
fix copied text in error string

ok reyk@

10 years agoA fantastic way to make a large unsigned number is to assign
beck [Thu, 24 Apr 2014 06:02:58 +0000 (06:02 +0000)]
A fantastic way to make a large unsigned number is to assign
a small signed one to it.. Some people on OpenSSL's list
noticed - http://marc.info/?l=openssl-dev&m=139809485525663&w=2

This should fix that, and make sure we don't try to write out insane
amounts of stuff.
ok miod@ tedu@

10 years agoremove redundant asign. from David Hill
tedu [Thu, 24 Apr 2014 04:45:43 +0000 (04:45 +0000)]
remove redundant asign. from David Hill

10 years agoSupport for the -ssl2 option has been removed, so remove it from usage
lteo [Thu, 24 Apr 2014 04:36:08 +0000 (04:36 +0000)]
Support for the -ssl2 option has been removed, so remove it from usage
as well ("openssl ciphers -h").

"sure" miod@

10 years agoon today's episode of things you didn't want to learn:
tedu [Thu, 24 Apr 2014 04:31:30 +0000 (04:31 +0000)]
on today's episode of things you didn't want to learn:
do_ssl3_write() is recursive. and not in the simple, obvious way, but in
the sneaky called through ssl3_dispatch_alert way. (alert level: fuchsia)
this then has a decent chance of releasing the buffer that we thought we
were going to use. check for this happening, and if the buffer has gone
missing, put another one back in place.
the direct recursive call is safe because it won't call ssl3_write_pending
which is the function that actually does do the writing and releasing.
as reported by David Ramos to openssl-dev:
http://marc.info/?l=openssl-dev&m=139809493725682&w=2
ok beck

10 years agomatch some more intel sata devices in ide mode
jsg [Thu, 24 Apr 2014 04:11:17 +0000 (04:11 +0000)]
match some more intel sata devices in ide mode

10 years agoregen
jsg [Thu, 24 Apr 2014 04:08:01 +0000 (04:08 +0000)]
regen

10 years agoadd some more intel sata devices in ide mode
jsg [Thu, 24 Apr 2014 04:07:25 +0000 (04:07 +0000)]
add some more intel sata devices in ide mode

10 years agocalloc is better. from Peter Malone
tedu [Thu, 24 Apr 2014 01:57:06 +0000 (01:57 +0000)]
calloc is better. from Peter Malone

10 years agocalloc is better. from Peter Malone
tedu [Thu, 24 Apr 2014 01:34:35 +0000 (01:34 +0000)]
calloc is better. from Peter Malone

10 years agorepair missing semicolon. from Ian Mcwilliam
tedu [Thu, 24 Apr 2014 01:04:52 +0000 (01:04 +0000)]
repair missing semicolon. from Ian Mcwilliam

10 years agomisplaced punctuation
schwarze [Thu, 24 Apr 2014 00:28:02 +0000 (00:28 +0000)]
misplaced punctuation

10 years agoUnifdef -UPKCS1_CHECK and remove SSL_OP_PKCS1_CHECK_[12], this is leftover
miod [Wed, 23 Apr 2014 22:26:25 +0000 (22:26 +0000)]
Unifdef -UPKCS1_CHECK and remove SSL_OP_PKCS1_CHECK_[12], this is leftover
``debug'' code from a 15+ years old bugfix and the SSL_OP_PKCS1_CHECK_*
constants have had a value of zero since ages. No production code should use
them.

ok beck@

10 years agoain't nobody got time for hpux
tedu [Wed, 23 Apr 2014 21:58:05 +0000 (21:58 +0000)]
ain't nobody got time for hpux

10 years agofix some variables
tedu [Wed, 23 Apr 2014 21:55:26 +0000 (21:55 +0000)]
fix some variables

10 years agoreplace a bunch of hand duped strings with strdup
tedu [Wed, 23 Apr 2014 21:54:30 +0000 (21:54 +0000)]
replace a bunch of hand duped strings with strdup

10 years agoDon't bother generating win64 assembly prologue.
miod [Wed, 23 Apr 2014 21:53:18 +0000 (21:53 +0000)]
Don't bother generating win64 assembly prologue.

10 years agomalloc/memset -> calloc. from peter malone
tedu [Wed, 23 Apr 2014 21:49:49 +0000 (21:49 +0000)]
malloc/memset -> calloc. from peter malone

10 years agoNo longer needed during build. Brings a smile on beck@'s face.
miod [Wed, 23 Apr 2014 21:28:52 +0000 (21:28 +0000)]
No longer needed during build. Brings a smile on beck@'s face.

10 years agoAudit malloc(3)/calloc(3)/realloc(3) usage.
schwarze [Wed, 23 Apr 2014 21:06:33 +0000 (21:06 +0000)]
Audit malloc(3)/calloc(3)/realloc(3) usage.
* Change eight reallocs to reallocarray to be safe from overflows.
* Change one malloc to reallocarray to be safe from overflows.
* Change one calloc to reallocarray, no zeroing needed.
* Change the order of arguments of three callocs (aesthetical).

10 years agonull pointers after free to prevent double frees and worse. also fix a
tedu [Wed, 23 Apr 2014 21:01:15 +0000 (21:01 +0000)]
null pointers after free to prevent double frees and worse. also fix a
very obvious use after free. this file may still be a total loss.

10 years agoThe usual idiom to cope with systems not defining socklen_t is to add a
miod [Wed, 23 Apr 2014 20:59:36 +0000 (20:59 +0000)]
The usual idiom to cope with systems not defining socklen_t is to add a
#define socklen_t int
somewhere (or a typedef, whatever gives you an integer type of the size
your system expects as the 3rd argument of accept(2), really).

OpenSSL here is a bit more creative by using an union of an int and a size_t,
and extra code if sizeof(int) != sizeof(size_t) in order to recover the
proper size. With a comment mentioning that this has no chance to work on
a platform with a stack growing up and accept() returning an int, fortunately
this seems to work on HP-UX.

Switch to the light side of the force and declare and use socklen_t variables,
period. If your system does not define socklen_t, consider bringing it back
to your vendor for a refund.

ok matthew@ tedu@

10 years agowhitespace
tedu [Wed, 23 Apr 2014 20:50:18 +0000 (20:50 +0000)]
whitespace

10 years agoclose socket in failure cases too
tedu [Wed, 23 Apr 2014 20:22:37 +0000 (20:22 +0000)]
close socket in failure cases too

10 years agoif realloc failed, BIO_accept would leak memory and return NULL, causing
tedu [Wed, 23 Apr 2014 20:21:23 +0000 (20:21 +0000)]
if realloc failed, BIO_accept would leak memory and return NULL, causing
caller to crash. Fix leak and return an error instead. from Chad Loder

10 years agoOne last Dec C tentacle on alpha.
miod [Wed, 23 Apr 2014 19:20:36 +0000 (19:20 +0000)]
One last Dec C tentacle on alpha.

10 years agoWhen I grow up, I want to write workaround for long long multiplications
miod [Wed, 23 Apr 2014 19:17:48 +0000 (19:17 +0000)]
When I grow up, I want to write workaround for long long multiplications
under __TANDEM systems and compilers, using hardcoded octal numbers. NOT.

10 years agoRemove IRIX_CC_BUG workaround.
miod [Wed, 23 Apr 2014 19:16:15 +0000 (19:16 +0000)]
Remove IRIX_CC_BUG workaround.

10 years agoI'm glad to know that Ultrix CC has a bug optimizing switch() statements
miod [Wed, 23 Apr 2014 19:14:59 +0000 (19:14 +0000)]
I'm glad to know that Ultrix CC has a bug optimizing switch() statements
lacking an explicit `case 0:' construct. But Ultrix has been dead for more than
15 years, really. Don't give it any reason to move out of its coffin.

10 years agoGrr, the more you remove, the more there remain.
miod [Wed, 23 Apr 2014 19:12:21 +0000 (19:12 +0000)]
Grr, the more you remove, the more there remain.

10 years agoForgotten during latest spring cleaning of unreferenced bits.
miod [Wed, 23 Apr 2014 19:11:19 +0000 (19:11 +0000)]
Forgotten during latest spring cleaning of unreferenced bits.

10 years agoUnifdef -UPEDANTIC. ok beck@ tedu@
miod [Wed, 23 Apr 2014 19:09:48 +0000 (19:09 +0000)]
Unifdef -UPEDANTIC. ok beck@ tedu@

10 years agoAudit strlcpy(3)/strlcat(3) usage:
schwarze [Wed, 23 Apr 2014 19:08:52 +0000 (19:08 +0000)]
Audit strlcpy(3)/strlcat(3) usage:
* Add missing truncation checks to three calls.
* In four cases where we know that the distination buffer is large enough,
cast the return vailue to (void).

10 years agoRemove duplicate pointer assignment in ASN1_primitive_free(); Dirk Engling
miod [Wed, 23 Apr 2014 19:01:50 +0000 (19:01 +0000)]
Remove duplicate pointer assignment in ASN1_primitive_free(); Dirk Engling

10 years agoFigure out endianness at compile-time, using _BYTE_ORDER from
miod [Wed, 23 Apr 2014 18:40:39 +0000 (18:40 +0000)]
Figure out endianness at compile-time, using _BYTE_ORDER from
<machine/endian.h>, rather than writing 1 to a 32-bit variable and checking
whether the first byte is nonzero.

tweaks and ok matthew@; ok beck@ tedu@

10 years agoRemove more Kerberos cruft.
ajacoutot [Wed, 23 Apr 2014 18:24:23 +0000 (18:24 +0000)]
Remove more Kerberos cruft.

ok jca@ jmc@

10 years agoBetter name for fdmaskp, reduce the scope of some variables, don't abuse
jca [Wed, 23 Apr 2014 18:16:36 +0000 (18:16 +0000)]
Better name for fdmaskp, reduce the scope of some variables, don't abuse
cc for poll()'s return value, and indent decls.  ok florian@

10 years agoimprove SQL style: avoid "SELECT *", be explicit in what columns we want;
schwarze [Wed, 23 Apr 2014 16:33:37 +0000 (16:33 +0000)]
improve SQL style: avoid "SELECT *", be explicit in what columns we want;
suggested by espie@.

10 years agotweak previous; sorry ingo, my review was pretty poor;
jmc [Wed, 23 Apr 2014 16:26:33 +0000 (16:26 +0000)]
tweak previous; sorry ingo, my review was pretty poor;

10 years agoAudit strlcpy(3)/strlcat(3) usage.
schwarze [Wed, 23 Apr 2014 16:07:06 +0000 (16:07 +0000)]
Audit strlcpy(3)/strlcat(3) usage.

* Repair three instances of silent truncation, use asprintf(3).
* Change two instances of strlen(3)+malloc(3)+strlcpy(3)+strlcat(3)+...
to use asprintf(3) instead to make them less error prone.
* Cast the return value of four instances where the destination
buffer is known to be large enough to (void).
* Completely remove three useless instances of strlcpy(3)/strlcat(3).
* Mark two places in -Thtml with XXX that can cause information loss
and crashes but are not easy to fix, requiring design changes of
some internal interfaces.
* The file mandocdb.c remains to be audited.

10 years agoFix format string in DEBUG message (not compiled by default).
reyk [Wed, 23 Apr 2014 15:45:16 +0000 (15:45 +0000)]
Fix format string in DEBUG message (not compiled by default).

ok blambert@

10 years agoremove Z option and default to something halfway to J.
tedu [Wed, 23 Apr 2014 15:07:27 +0000 (15:07 +0000)]
remove Z option and default to something halfway to J.
we always junk small chunks now, and the first part of pages,
but only after free. J still does the old thing. j disables everything.
Consider experimental as we evaluate performance in the real world.
ok otto

10 years agoNo need for vargs here.
florian [Wed, 23 Apr 2014 14:43:14 +0000 (14:43 +0000)]
No need for vargs here.
While there move declaration of divert{,6}_output() to .c as it's a
private function. Also switch first two args to make it more like
similar functions (both suggested by mpi@).
Input/OK mpi@, OK lteo@

10 years agoUse arc4random as PRNG backend, instead of libcrypto RAND.
jca [Wed, 23 Apr 2014 14:15:03 +0000 (14:15 +0000)]
Use arc4random as PRNG backend, instead of libcrypto RAND.
Feedback and ok guenther@ deraadt@

Discussed with upstream, who is preparing an arc4random backend.