- Fixup algo_needs_reason string buffer length.

This commit is contained in:
W.C.A. Wijngaards 2024-07-08 15:38:27 +02:00
parent bed7cc2a90
commit 169acfc546
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
8 July 2024: Wouter
- Fix that validation reason failure that uses string print uses
separate buffer that is passed, from the scratch validation buffer.
- Fixup algo_needs_reason string buffer length.
5 July 2024: Yorgos
- Don't check for message TTL changes if the RRsets remain the same.

View File

@ -695,10 +695,10 @@ void algo_needs_reason(int alg, char** reason, char* s, char* reasonbuf,
{
sldns_lookup_table *t = sldns_lookup_by_id(sldns_algorithms, alg);
if(t&&t->name)
snprintf(reasonbuf, sizeof(reasonlen), "%s with algorithm %s",
s, t->name);
else snprintf(reasonbuf, sizeof(reasonlen), "%s with algorithm "
"ALG%u", s, (unsigned)alg);
snprintf(reasonbuf, reasonlen, "%s with algorithm %s", s,
t->name);
else snprintf(reasonbuf, reasonlen, "%s with algorithm ALG%u", s,
(unsigned)alg);
*reason = reasonbuf;
}