Merged in ziggurat29/apps/media-booboo (pull request #31)

heap corruption due to buffer overrun when initializing txbuffer; incorrect size
This commit is contained in:
Gregory Nutt 2016-04-20 19:29:01 -06:00
commit 736c68f136

View File

@ -194,7 +194,7 @@ int media_main(int argc, char *argv[])
/* Fill buffer with a (possibly) unique pattern */
for (i = 0; i < info.nblocks; i++)
for (i = 0; i < info.blocksize; i++)
{
txbuffer[i] = value;
if (++value >= END_VALUE)
@ -343,7 +343,7 @@ int media_main(int argc, char *argv[])
/* Fill buffer with a (possibly) unique pattern */
for (i = 0; i < info.nblocks; i++)
for (i = 0; i < info.blocksize; i++)
{
txbuffer[i] = value;
if (++value >= END_VALUE)