]> granicus.if.org Git - curl/commit
smtp: Fixed dot stuffing being performed when no new data read
authorSteve Holme <steve_holme@hotmail.com>
Sun, 30 Nov 2014 14:24:35 +0000 (14:24 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 30 Nov 2014 14:24:35 +0000 (14:24 +0000)
commit9afd97022eb3ff586b13d33a7d85ce502d06e93c
tree41ff6752332cbb944a060857711e9dfd0484656d
parent5409f32984f17c25e84a52fe86f890c73133d531
smtp: Fixed dot stuffing being performed when no new data read

Whilst I had moved the dot stuffing code from being performed before
CRLF conversion takes place to after it, in commit 4bd860a001, I had
moved it outside the 'when something read' block of code when meant
it could perform the dot stuffing twice on partial send if nread
happened to contain the right values. It also meant the function could
potentially read past the end of buffer. This was highlighted by the
following warning:

warning: `nread' might be used uninitialized in this function
lib/transfer.c