]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fixup algo_needs_reason string buffer length.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 8 Jul 2024 13:38:27 +0000 (15:38 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 8 Jul 2024 13:38:27 +0000 (15:38 +0200)
doc/Changelog
validator/val_sigcrypt.c

index 8fbbf3c0569ce6b841b68f1d087235b9d16db774..ad28c27e442c3a479e8d841f7e37c3f86d418f6a 100644 (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.
index 3e90eeb84fcb330cb1462589b9c2e977ab2cf4ac..9251d2b1f38a59881557ae962bb82597c3a74ba8 100644 (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;
 }