by api · 12y ago · 0 comments
Also, some of these firmwares are based on an existing code base, it's just cheaper to hack it than replace it.
Just a thought. Seems like less a perturbation than rewriting a limited resource device for one feature.
If you sanitise inputs a wee bit, chances are you'll forget some. Or some endpoints. Or you'll sanitise based on ASCII but accept non-minimal UTF-8 encoding. Or non-ascii encodings altogether.
Making it extremely hard to impossible to implement the error class sounds like a better idea.
And I've never even been interested in UTF-8, much less implemented anything that uses it.
I think the OP is a little too cute with "don't use sprintf()" - it and snprintf() can both be used completely safely.
Now, it may well be that the UI can be completely done in, say, eLua and the guts of the thing done in 'C'. I'd go for that if it made any sense to any body else on the team. As a practice, I avoid working on things that will be on the larger Internet.