This would be a lot of code to maintain, for just %n, the 2nd args for %s,%c,%] and the null pointer check for %s. There are not many good small implementations. The best have license problems, like Huawei's securec. * https://github.com/UVP-Tools/UVP-Tools/tree/master/uvp-monitor/secure * freebsd, musl * reactos, wine TODO: - [x] sprintf_s(str2, LEN, "%g", 0.1) => "0.1") // FIXME 0.100000 trailing-zeros not stripped - [x] sprintf_s(str2, LEN, "%g", 1.0) => "1") // FIXME 1.00000 trailing-dot not stripped - [ ] scanf_s
This would be a lot of code to maintain, for just %n, the 2nd args for %s,%c,%] and the null pointer check for %s.
There are not many good small implementations. The best have license problems, like Huawei's securec.
TODO: