3 ms·
> But there's another valuable lesson about interpreting binary/string blobs: don't make guesses about the format of the data from its value. You could say the
by cptskippy 8y ago
> But there's another valuable lesson about interpreting binary/string blobs: don't make guesses about the format of the data from its value.
You could say the same about the file extension, meta data or any other means.
The best thing you can do is write your code to validate the input and to fail early, explicitly, and safely if it runs into a problem.