X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fwavefront%2Fwavefront_synth.c;h=1d9ee967b0e6d439ea4bb8b3cc9473df862fb52e;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=b4fab43e4ec1b28ed94d05fccbcffa0259f9ffa6;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index b4fab43e4..1d9ee967b 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -1961,6 +1961,12 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) break; } + if (section_length < 0 || section_length > WF_SECTION_MAX) { + snd_printk ("invalid firmware section length %d\n", + section_length); + goto failure; + } + if (sys_read (fd, section, section_length) != section_length) { snd_printk ("firmware section " "read error.\n");