[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b14f85: [SqueakSSL] fix endless recursion on failes connec...

Tobias Pape Das.Linux at gmx.de
Wed Sep 7 09:25:04 UTC 2016


Hi Eliot

On 07.09.2016, at 09:53, Eliot Miranda <eliot.miranda at gmail.com> wrote:

> Hi Guys,
> 
>     I notice that carriage returns are creeping into files, presumably because you're editing on Wndows with editors that insert CR+LF at line-endf instead of line-end.  Sorry to be so anal but can we try and avoid CRs in the C source?

So, the thing here is that _the whole file_  _already_ uses CRLF throughout:

file -k 'platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c'
platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c: ASCII c program text, with CRLF line terminators

 od -N400 -c 'platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c' 
0000000    /   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
0000020    *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
*
0000100    *   *   *   *   *   *   *   *   *   *   *   *   *  \r  \n    
0000120    *               P   R   O   J   E   C   T   :       S   q   u
0000140    e   a   k   S   S   L       i   m   p   l   e   m   e   n   t
0000160    a   t   i   o   n       f   o   r       M   a   c       O   S
0000200        X  \r  \n       *               F   I   L   E   :        
0000220            s   q   M   a   c   2   S   S   L   .   c  \r  \n    
0000240    *               C   O   N   T   E   N   T   :       S   S   L
0000260        p   l   a   t   f   o   r   m       f   u   n   c   t   i
0000300    o   n   s  \r  \n       *  \r  \n       *               A   U
0000320    T   H   O   R   S   :           A   n   d   r   e   a   s    
0000340    R   a   a   b       (   a   r   )  \r  \n       *  \r  \n    
0000360    *                                                       T   o
0000400    b   i   a   s       P   a   p   e       (   t   o   p   a   )
0000420   \r  \n       *                                                
0000440                H   a   s   s   o       P   l   a   t   t   n   e
0000460    r       I   n   s   t   i   t   u   t   e   ,       P   o   s
0000500    t   d   a   m   ,       G   e   r   m   a   n   y  \r  \n    
0000520    *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
*
0000620


Git is merely reminding us that we inserted lines with CRLF, just to be aware. 
The file does _NOT_ have mixed line-endings.


That being said, I agree we should have all the C-files be LF-only.
If time permits, I'll prepare a PR.

Best regards
	-Tobias

> 
> TIA
> 
> diff --git a/platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c b/platforms/Mac OS/pl
> index 3a78d06..a1a8891 100644
> --- a/platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c     
> +++ b/platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c     
> @@ -289,12 +289,12 @@ sqInt sqCreateSSL(void)
>  
>      if (handle >= handleMax) {
>          const int delta = 100;
> +               int i;^M
>          /* Resize the handle buffer */
>          handleBuf = (sqSSL**)realloc(handleBuf,
>                                       (handleMax + delta) * sizeof(sqSSL*));
> -        for (int i = handleMax; i < handleMax + delta; i++) {
> +        for (i = handleMax; i < handleMax + delta; i++)^M
>              handleBuf[i] = NULL;
> -        }
>          handleMax += delta;
>      }
> 
> On Wed, Sep 7, 2016 at 9:21 AM, GitHub <noreply at github.com> wrote:
>  
>   Branch: refs/heads/Cog
>   Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
>   Commit: b14f85f17051df09c7c7b94d03aef3b0207bef00
>       https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b14f85f17051df09c7c7b94d03aef3b0207bef00
>   Author: Tobias Pape <tobias at netshed.de>
>   Date:   2016-09-07 (Wed, 07 Sep 2016)
> 
>   Changed paths:
>     M platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.c
> 
>   Log Message:
>   -----------
>   [SqueakSSL] fix endless recursion on failes connect
> 
> Because returning -1 here is actually saying "need more data"
> 
> 
> 
> 
> 
> 
> -- 
> _,,,^..^,,,_
> best, Eliot



More information about the Vm-dev mailing list