This question already has an answer here:
You often see statements like "all non-trivial software has bugs" or "all non-trivial abstractions are leaky". But what makes a program "trivial" instead of non-trivial? Where is the cut-off line at which we can say that a program isn't trivial and "excuse" bugs?
Even something only a few lines long could have bugs. Say you have a simple command line C program that asks "What is your name?", reads a response using scanf or gets, stores it in a buffer and prints back "Hello " + name. That program could easily have a buffer overflow if the input is larger than a buffer, so it could have a bug even though it's only a few lines.
But if you ensured that you always allocated eblnough memory or bounds checked, etc, you don't have the bug. So is the program "trivial" or not? It can be buggy or not, but it's small and simple. Can we give any meaning to the idea of a "trivial program" or is it merely an excuse for sloppyness?