Re: [newbie] strcpy, strtok and strcat problem...



CBFalconer <cbfalconer@xxxxxxxxx> wrote:

You have some problems here. First, strtok is not a standard
function, and even the various implementations have problems, such
as lack of re-entrancy, fouling the original string, failure to
detect omitted tokens, etc. In addition strcpy and strcat are
inherently unsafe, and are much better replaced by the BSD proposed
strlcpy and strlcat routines. You can get these last two, in
portable standard C, at:

<http://cbfalconer.home.att.net/download/>

I have also written a replacement for strtok without the faults,
but simultaneously with different characteristics. Note that it
includes a conditionally compiled testing mechanism. Its source
follows:

ok, fine, thanks for all, i'll examine that asap !!!
--
une bévue
.



Relevant Pages

  • Re: 94 VR6 Passat Drive Belt and Tensioner?
    ... >replacement didn't make a year), shock, struts and springs, all ... >whole set of H&R's vs two new factory rears) and front wheel bearings, ... and failure won't tear anything up. ... >any issues for this vintage of VR6? ...
    (rec.autos.makers.vw.watercooled)
  • Re: another board
    ... We've come to prefer BGA packages. ... In fact, we've had zero BGA problems, if you don't ... Ordering a replacement ... Failure does not prove something is impossible, ...
    (sci.electronics.design)
  • Re: Loud suffers as Chinese producer collapses
    ... It is an inferior bonding agent that will inevitably lead to premature ... failure in many items and their replacement will have a far greater ... environmental impact than any amount of tiny lead droplets on a board. ...
    (rec.audio.pro)
  • Re: Cars that never go wrong by Steve Firth
    ... or manufacture-related unexpected early failure. ... in view of the fact that most owners will never have to replace dampers because they get rid of their cars before they become troublesome - they can hardly be regarded as 'consumables' - beause 'consumable' items are those that require regular and frequent replacement. ...
    (uk.rec.driving)
  • Re: Cars that never go wrong by Steve Firth
    ... Like when it fails.. ... manufacture-related unexpected early failure. ... you tend to run your cars (which I kinda alluded to in another recent ... material or manufacturing flaw - rather than needing replacement through ...
    (uk.rec.driving)