Gabriel M. Beddingfield 3e3376a4b7 tinycap, tinyplay: Check *argv before dereferencing.
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>
2012-02-08 16:58:27 -06:00
2011-10-27 11:24:39 -07:00
2012-02-08 16:53:32 -06:00
2011-05-25 14:05:42 -07:00
2011-10-27 11:24:39 -07:00

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

S
Description
Third-party open-source software tinyalsa | 三方开源软件tinyalsa
Readme 1.1 MiB
Languages
C 77.3%
C++ 14.9%
Roff 2.1%
Shell 1.9%
Makefile 1.6%
Other 2.2%