From: Emil Engler Date: Wed, 26 Aug 2020 11:33:42 +0000 (+0200) Subject: doh: add error message for DOH_DNS_NAME_TOO_LONG X-Git-Tag: curl-7_73_0~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6a17662f22d1b00f89295086ea71ac73700f477;p=thirdparty%2Fcurl.git doh: add error message for DOH_DNS_NAME_TOO_LONG When this error code was introduced in b6a53fff6c1d07e8a9, it was forgotten to be added in the errors array and doh_strerror function. Closes #5863 --- diff --git a/lib/doh.c b/lib/doh.c index 8bc3428ff5..31c2438833 100644 --- 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"; }