15 ms·
Malformed Wi-Fi name bug can require iPhone factory reset to fix
- colejohnson66 5y agoAs someone who doesn’t program in C or C++ regularly, aren’t bugs from format strings caused by passing the user string as the “format string”? For example, printf(userInput) // WRONG printf("%s", userInput) // OK Don’t compilers warn about these potential bugs?
- citrin_ru 5y agoOf course compilers warn about this, but too many programmers just ignore warnings. Some warnings can be ignored without dire consequences. The problem is when compilation emits 100 warnings which are not critical it is easy to miss 101th which is critical. And until you'll fix all warnings you cannot build with -Werror. I like BSD approach here: they use different warning levels (WARNS) for different directories and compile all code with -Werror.
- colejohnson66 5y agoIf the warnings are being ignored, and there’s a valid reason, can’t they be ignored? For example, unused variable warnings can be suppressed in many programming language linters/compilers.
- meitham 5y agoTLDR: connecting to a WiFi AP that has %s and %p, e.g. %secretclub%power can brick the WiFi connectivity of iPhone even beyond repeated resets!