• ColonelThirtyTwo@pawb.social
    link
    fedilink
    arrow-up
    48
    ·
    edit-2
    4 months ago

    It’s mostly because C is notorious for not holding your hand and not telling you when you mess up. Write one past the array’s length? Might do nothing, might crash, might mess up some other data, might crash later in somewhere completely different.

    • Wirlocke@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      14
      ·
      4 months ago

      Or in some cases might crash 8.5 million computers worldwide.

      Yes the Crowdstrike crash was caused by going 1 past an array length, caused by a magic number index and a regex mistake, and wasn’t caught because the tests didn’t work.

      The whole thing was a compound series of amateur mistakes, but with kernel access at boot time.