#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 Aug 27, 2010 at 4:46:26 PM 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 Nov 24, 2014 at 6:58:28 PM 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.