• (nodebb)

    they don't really think

    This is TRWTF. The addendum "too much" after "think" is of no importance, and in any event isn't correct. It should be dropped in favour of "enough" or even "at all". And that's bad, because building software is a task for people who think about what they are doing.

  • Vera (unregistered)

    So, two WTFs for the price of one. On the one hand, "every version is 1.0!" On the other hand, "Yeah, we'll just check if one of the strings has ran out, not like file names will get longer/shorter between versions."

    I just hope that the latest "1.0" version (minus the old backup) doesn't introduce a boatload of new issues, it looks like they have plenty already.

  • (nodebb)

    every version is 1.0!

    For when your company's software is so well-written that you decide to create your own problems.

  • (nodebb) in reply to Vera

    every version is 1.0!

    Makes me wonder what actually gets updated between software "versions"

  • Foo AKA Fooo (unregistered)

    Also, correct me if I'm wrong, but it seems like a malicious set of filenames could cause buffer overruns here.

    If so, this would be serious, but I don't see it. I suppose you're referring to the lack of an explicit "*p2 != '\0'" check, but "*p2 >= '0'" (note: digit '0', which is different from and greater than NUL) also serves this purpose. So if p2 is at the end of the string, it will either (if p1 is too) reach the final return (which is fine, reading the NUL at the end of the strings), or (if p1 is a digit) reach the "return 1", otherwise "*p1 != *p2" will be true and it will reach the second-last return. It might not be the clearest control flow, but I don't see any case where p2 is incremented beyond the terminating NUL. Am I missing something?

  • Wyatt (unregistered)
    Comment held for moderation.

Leave a comment on “One Version of Events”

Log In or post as a guest

Replying to comment #691140:

« Return to Article