Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
teckpack: codecs: Use scnprintf() for robustness
Reasoning explained here torvalds/linux@0623682 Also fixes this warning: ../techpack/audio/asoc/codecs/wcd-clsh.c:73:9: warning: ‘snprintf’ argument 4 overlaps destination object ‘buf’ [-Wrestrict] 73 | cnt = snprintf(buf, buflen - cnt - 1, "%s%s%s", buf, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 74 | buf[0] == '\0' ? "[" : "|", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 | states[i]); | Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com> Signed-off-by: CloudedQuartz <ravenklawasd@gmail.com>
- Loading branch information