source: freewrt/target/linux/generic-2.4/patches/222-sound.patch@ a3abab6

freewrt_1_0 freewrt_2_0
Last change on this file since a3abab6 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.1 KB
  • drivers/sound/sound_core.c

    diff -rNu linux-2.4.30/drivers/sound/sound_core.c linux-2.4.30.new/drivers/sound/sound_core.c
    old new  
    174174        }
    175175       
    176176        if (r == low)
    177                 sprintf (name_buf, "%s", name);
     177                snprintf (name_buf, sizeof(name_buf), "%s", name);
    178178        else
    179                 sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP);
     179                snprintf (name_buf, sizeof(name_buf), "%s%d", name, (r - low) / SOUND_STEP);
    180180        s->de = devfs_register (devfs_handle, name_buf,
    181181                                DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor,
    182182                                S_IFCHR | mode, fops, NULL);
     
    507507                 *  ALSA toplevel modules for soundcards, thus we need
    508508                 *  load them at first.   [Jaroslav Kysela <perex@jcu.cz>]
    509509                 */
    510                 sprintf(mod, "sound-slot-%i", unit>>4);
     510                snprintf(mod, sizeof(mod), "sound-slot-%i", unit>>4);
    511511                request_module(mod);
    512                 sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
     512                snprintf(mod, sizeof(mod), "sound-service-%i-%i", unit>>4, chain);
    513513                request_module(mod);
    514514                spin_lock(&sound_loader_lock);
    515515                s = __look_for_unit(chain, unit);
Note: See TracBrowser for help on using the repository browser.