Just a sample of the Echomail archive
Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.
|    MAKENL_NG    |    MakeNL Next Generation.    |    1,725 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,422 of 1,725    |
|    Wilfred van Velzen to Andrew Leary    |
|    Re: MakeNL 3.4.6 Release    |
|    02 Dec 16 13:11:10    |
   
   Hi Andrew,   
      
   On 2016-12-01 22:20:27, Andrew Leary wrote to All:   
    about: "MakeNL 3.4.6 Release":   
      
    AL> MakeNL 3.4.6 has been released and hatched into the COORDUTL fileecho.   
      
   I noticed the following in the output.c file:   
      
   + if (RemoveBOM)   
   + {   
   + templine = linebegin;   
   + templine = strstr(linebegin, "\xef\xbb\xbf");   
   + if (templine != NULL) /* BOM found on line */   
   + {   
   + templn2 = templine + 3; /* Move rest of line over BOM */   
   + strcpy(templine, templn2);   
   + }   
   + }   
      
   Your using strcpy to copy overlapping strings. The behaviour of strcpy when   
   source and destination overlap is undefined for all definitions of strcpy I   
   know. So it might work, or it might not, for all permutations of compilers,   
   os's and compiler options, that makenl is compiled on.   
      
   I suggest:   
      
    memmove(templine, templn2, strlen(templn2) + 1);   
      
      
   The same is true for the fts5.c file, with about the same code...   
      
      
   Bye, Wilfred.   
      
      
   --- FMail-W32 1.73.8.50-B20161201   
    * Origin: Native IPv6 connectable node (2:280/464)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca