]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ipp.c
CVE-2019-2228: Fix ippSetValueTag validation of default language.
[thirdparty/cups.git] / cups / ipp.c
index d0cac8cfe198c97bd218f661018b21a6f7e48a3d..1595b8b6103e0c938dcb9f1a6172ea9b1c7d249e 100644 (file)
@@ -4565,7 +4565,7 @@ ippSetValueTag(
           return (0);
 
         if (ipp->attrs && ipp->attrs->next && ipp->attrs->next->name &&
-            !strcmp(ipp->attrs->next->name, "attributes-natural-language"))
+            !strcmp(ipp->attrs->next->name, "attributes-natural-language") && (ipp->attrs->next->value_tag & IPP_TAG_CUPS_MASK) == IPP_TAG_LANGUAGE)
         {
          /*
           * Use the language code from the IPP message...