#3804: HUGE_STRING is too short
--------------------------+----------------------
Reporter: richardp345 | Owner: mutt-dev
Type: defect | Status: new
Priority: minor | Milestone:
Component: mutt | Version: 1.5.24
Resolution: | Keywords:
--------------------------+----------------------
Comment (by Kevin McCarthy <kevin@…>):
In [b315c4d4ede71b4d0f00c7155ea6de64ff5c1c48]:
{{{
#!CommitTicketReference repository=""
revision="b315c4d4ede71b4d0f00c7155ea6de64ff5c1c48"
Make sasl authentication buffers dynamically sized. (see #3804)
The reporter found that the current buffer of HUGE_STRING was
insufficient in his case to encode the clientout response back to the
server in imap_auth_sasl().
Since sasl gives us the size of "clientout", we can dynamically malloc
and resize the buffer as needed. This patch uses max(LONG_STRING,
(clientoutlen*2)). This is sufficient to hold the base64 encoded
value plus additional prefix/suffix needed in each protocol.
The size is rechecked after each sasl_client_step() and resized as
needed.
Similar code is in pop_auth_sasl() and smtp_auth_sasl(), so convert
all three to use a dynamic buffer.
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3804#comment:11>
Mutt <http://www.mutt.org/>
The Mutt mail user agent