]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix Kerberos truncation (Issue #5435)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 14 Nov 2018 15:15:29 +0000 (10:15 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 14 Nov 2018 15:15:29 +0000 (10:15 -0500)
cups/auth.c

index a1f50423c4b397a40b00e82eafcd71c4f85960ac..5b650ae34987057468b798a66c428c22c4006379 100644 (file)
@@ -447,7 +447,7 @@ _cupsSetNegotiateAuthString(
     */
 
     int authsize = 10 +                        /* "Negotiate " */
-                  (int)output_token.length * 4 / 3 + 1 + 1;
+                  (int)((output_token.length * 4 / 3 + 3) & ~3) + 1;
                                        /* Base64 + nul */
 
     httpSetAuthString(http, NULL, NULL);