Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#1693 closed defect (fixed)

IMFS memfile has incorrect pointer check.

Reported by: Joel Sherrill Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

$ cvs diff -u libfs/src/imfs/memfile.c
Index: libfs/src/imfs/memfile.c
===================================================================
RCS file: /usr1/CVS/rtems/cpukit/libfs/src/imfs/memfile.c,v
retrieving revision 1.38
diff -u -r1.38 memfile.c
--- libfs/src/imfs/memfile.c 30 Jul 2010 22:36:32 -0000 1.38
+++ libfs/src/imfs/memfile.c 27 Aug 2010 17:39:08 -0000
@@ -931,7 +931,7 @@

return 0;


p2 = (block_p *)p1[ doubly ];

  • if ( !p )

+ if ( !p2 )

return 0;


return (block_p *)&p2[ singly ];

Change History (2)

comment:1 Changed on 08/27/10 at 16:46:26 by Joel Sherrill

Resolution: fixed
Status: newclosed

This was spotted as dead code by http://scan2.coverity.com:9104/cov.cgi?cid=71.

Patch committed to all impacted branches.

comment:2 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.