mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-21 12:39:20 +00:00
heap corruption due to buffer overrun when initializing txbuffer; incorrect size
This commit is contained in:
parent
7c8a23371d
commit
5d61e3d6eb
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue