sync with OpenBSD -current
This commit is contained in:
parent
9419b92700
commit
b62220995a
133 changed files with 2000 additions and 5128 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: err.c,v 1.62 2024/07/09 07:17:13 beck Exp $ */
|
||||
/* $OpenBSD: err.c,v 1.63 2024/08/31 10:09:15 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -1130,37 +1130,6 @@ ERR_asprintf_error_data(char * format, ...)
|
|||
}
|
||||
LCRYPTO_ALIAS(ERR_asprintf_error_data);
|
||||
|
||||
void
|
||||
ERR_add_error_vdata(int num, va_list args)
|
||||
{
|
||||
char format[129];
|
||||
char *errbuf;
|
||||
int i;
|
||||
|
||||
format[0] = '\0';
|
||||
for (i = 0; i < num; i++) {
|
||||
if (strlcat(format, "%s", sizeof(format)) >= sizeof(format)) {
|
||||
ERR_set_error_data("too many errors", ERR_TXT_STRING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (vasprintf(&errbuf, format, args) == -1)
|
||||
ERR_set_error_data("malloc failed", ERR_TXT_STRING);
|
||||
else
|
||||
ERR_set_error_data(errbuf, ERR_TXT_MALLOCED|ERR_TXT_STRING);
|
||||
}
|
||||
LCRYPTO_ALIAS(ERR_add_error_vdata);
|
||||
|
||||
void
|
||||
ERR_add_error_data(int num, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, num);
|
||||
ERR_add_error_vdata(num, args);
|
||||
va_end(args);
|
||||
}
|
||||
LCRYPTO_ALIAS(ERR_add_error_data);
|
||||
|
||||
int
|
||||
ERR_set_mark(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue