Fixed signed text extraction in case of detached signature, when signed MIME text line endings are CRLF
authorEdouard Tisserant <edouard@pep-project.org>
Mon, 29 May 2017 16:32:24 +0200
changeset 180954a7d37790b9
parent 1803 656f58b5b244
child 1810 0beaab16a32c
child 1813 0dbbba72dfbb
Fixed signed text extraction in case of detached signature, when signed MIME text line endings are CRLF
src/message_api.c
     1.1 --- a/src/message_api.c	Tue May 23 11:55:30 2017 +0200
     1.2 +++ b/src/message_api.c	Mon May 29 16:32:24 2017 +0200
     1.3 @@ -1503,7 +1503,10 @@
     1.4      if (!end_boundary)
     1.5          return PEP_UNKNOWN_ERROR;
     1.6  
     1.7 -    end_boundary--; // See RFC3156 section 5... FIXME: could be 2? CRLF?
     1.8 +    // See RFC3156 section 5...
     1.9 +    end_boundary--; 
    1.10 +    if (*(end_boundary - 1) == '\r')
    1.11 +        end_boundary--; 
    1.12  
    1.13      *ssize = end_boundary - start_boundary;
    1.14      *stext = start_boundary;