]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
doh: add error message for DOH_DNS_NAME_TOO_LONG
authorEmil Engler <me@emilengler.com>
Wed, 26 Aug 2020 11:33:42 +0000 (13:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 26 Aug 2020 20:51:29 +0000 (22:51 +0200)
When this error code was introduced in b6a53fff6c1d07e8a9, it was
forgotten to be added in the errors array and doh_strerror function.

Closes #5863

lib/doh.c

index 8bc3428ff5ee5e266b8565e2df980853f31d2e00..31c243883336271379ba32fa119aae3398f1df14 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -57,12 +57,13 @@ static const char * const errors[]={
   "Unexpected TYPE",
   "Unexpected CLASS",
   "No content",
-  "Bad ID"
+  "Bad ID",
+  "Name too long"
 };
 
 static const char *doh_strerror(DOHcode code)
 {
-  if((code >= DOH_OK) && (code <= DOH_DNS_BAD_ID))
+  if((code >= DOH_OK) && (code <= DOH_DNS_NAME_TOO_LONG))
     return errors[code];
   return "bad error code";
 }