=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/dc/mem.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/dc/mem.c 2017/12/12 19:08:57 1.9 +++ src/usr.bin/dc/mem.c 2017/12/17 08:21:10 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.9 2017/12/12 19:08:57 otto Exp $ */ +/* $OpenBSD: mem.c,v 1.10 2017/12/17 08:21:10 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -91,13 +91,19 @@ void bn_check(int x) { - if (x == 0) - err(1, "big number failure %lx", ERR_get_error()); + if (x == 0) { + ERR_load_BN_strings(); + errx(1, "BN failure: %s", + ERR_reason_error_string(ERR_get_error())); + } } void bn_checkp(const void *p) { - if (p == NULL) - err(1, "allocation failure %lx", ERR_get_error()); + if (p == NULL) { + ERR_load_BN_strings(); + errx(1, "BN failure: %s", + ERR_reason_error_string(ERR_get_error())); + } }