mirror of
https://github.com/openharmony/third_party_tinyalsa.git
synced 2026-07-20 18:59:49 -04:00
3e3376a4b73e0475d6e1be9cf533ea4ae0674ee3
In several places, argv is incremented and *argv is dereferenced
without checking to see if it is valid to do so. This could lead to a
buffer overrun if the user provides invalid parameters.
This patch generally changes this:
if (strcmp(*argv, "-r") == 0) {
argv++;
rate = atoi(*argv);
}
argv++;
To this:
if (strcmp(*argv, "-r") == 0) {
argv++;
if (*argv)
rate = atoi(*argv);
}
if (*argv)
argv++;
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
tinyalsa: a small library to interface with ALSA in the Linux kernel The aims are: - Provide a basic pcm and mixer API - If it's not absolutely needed, don't add it to the API - Avoid supporting complex and unnecessary operations that could be dealt with at a higher level
Description
Languages
C
77.3%
C++
14.9%
Roff
2.1%
Shell
1.9%
Makefile
1.6%
Other
2.2%