#1790 closed defect (fixed)

Libblock. Flash disk: Wrong memset parameters.

Reported by: nopscmn Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: lib/block Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

In flash disk block device implementation (flashdisk.c), function rtems_fdisk_read_block has next code:

bc = &fd->blocks[block];

if (!bc->segment)
{

#if RTEMS_FDISK_TRACE

rtems_fdisk_info (fd, "read-block: no segment mapping: %d", block);

#endif

memset (buffer, fd->block_size, 0xff);
return 0;

}

I think, memset parameters wrong. It must be: memset (buffer, 0xff, fd->block_size).

Change History (2)

comment:1 Changed on May 11, 2011 at 7:30:10 AM by Sebastian Huber

Milestone: 4.114.10
Resolution: fixed
Status: newclosed, sebastian.huber@embedded-brains.de

Fixed on CVS head and 4.10 branch.

comment:2 Changed on Oct 10, 2017 at 6:49:52 AM by Sebastian Huber

Component: scorelib/block
Note: See TracTickets for help on using tickets.