mutt stable branch with some hacks

Check the base64 decoding retval in auth_gss.

Abort if the value is not decodable.

+13 -2
+13 -2
imap/auth_gss.c
··· 199 199 goto bail; 200 200 } 201 201 202 - request_buf.length = mutt_buffer_from_base64 (buf2, idata->buf + 2); 202 + if (mutt_buffer_from_base64 (buf2, idata->buf + 2) < 0) 203 + { 204 + dprint (1, (debugfile, "Invalid base64 server response.\n")); 205 + gss_release_name (&min_stat, &target_name); 206 + goto err_abort_cmd; 207 + } 203 208 request_buf.value = buf2->data; 209 + request_buf.length = mutt_buffer_len (buf2); 204 210 sec_token = &request_buf; 205 211 206 212 /* Write client data */ ··· 234 240 dprint (1, (debugfile, "Error receiving server response.\n")); 235 241 goto bail; 236 242 } 237 - request_buf.length = mutt_buffer_from_base64 (buf2, idata->buf + 2); 243 + if (mutt_buffer_from_base64 (buf2, idata->buf + 2) < 0) 244 + { 245 + dprint (1, (debugfile, "Invalid base64 server response.\n")); 246 + goto err_abort_cmd; 247 + } 238 248 request_buf.value = buf2->data; 249 + request_buf.length = mutt_buffer_len (buf2); 239 250 240 251 maj_stat = gss_unwrap (&min_stat, context, &request_buf, &send_token, 241 252 &cflags, &quality);