Changeset 2bac9489 in rtems


Ignore:
Timestamp:
Jan 18, 2010, 11:04:09 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
9ba0e55
Parents:
8c29e98
Message:

2010-01-18 Joel Sherrill <joel.sherrill@…>

Coverity Id 12
Coverity Id 13
Coverity Id 14
Coverity Id 15

  • libmisc/stackchk/check.c: Rewrote loop to avoid possible buffer overruns when the pattern area size is not a multiple of 16. There were no current ports impacted by this but better to be safe.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r8c29e98 r2bac9489  
    112010-01-18      Joel Sherrill <joel.sherrill@oarcorp.com>
    22
    3         * libfs/src/imfs/imfs_symlink.c: Add comment on Coverity CID22. This is
    4         not a resource leak.
     3        Coverity Id 12
     4        Coverity Id 13
     5        Coverity Id 14
     6        Coverity Id 15
     7        * libmisc/stackchk/check.c: Rewrote loop to avoid possible buffer
     8        overruns when the pattern area size is not a multiple of 16.  There
     9        were no current ports impacted by this but better to be safe.
     10
     112010-01-18      Joel Sherrill <joel.sherrill@oarcorp.com>
     12
     13        Coverity Id 22
     14        * libfs/src/imfs/imfs_symlink.c: Add comment to explain why this
     15        is not a resource leak.
    516
    6172010-01-18      Joel Sherrill <joel.sherrill@oarcorp.com>
  • cpukit/libmisc/stackchk/check.c

    r8c29e98 r2bac9489  
    77 *         extension routines for that direction.
    88 *
    9  *  COPYRIGHT (c) 1989-2007.
     9 *  COPYRIGHT (c) 1989-2009.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    136136void Stack_check_Initialize( void )
    137137{
     138  int       i;
    138139  uint32_t *p;
     140  static    pattern[ 4 ] = {
     141    0xFEEDF00D, 0x0BAD0D06,  /* FEED FOOD to  BAD DOG */
     142    0xDEADF00D, 0x600D0D06   /* DEAD FOOD but GOOD DOG */
     143  };
    139144
    140145  if (Stack_check_Initialized)
     
    144149   * Dope the pattern and fill areas
    145150   */
    146 
    147   for ( p = Stack_check_Pattern.pattern;
    148         p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
    149         p += 4
    150       ) {
    151       p[0] = 0xFEEDF00D;          /* FEED FOOD to BAD DOG */
    152       p[1] = 0x0BAD0D06;
    153       p[2] = 0xDEADF00D;          /* DEAD FOOD GOOD DOG */
    154       p[3] = 0x600D0D06;
     151  p = Stack_check_Pattern.pattern;
     152  for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
     153      p[i] = pattern[ i%4 ];
    155154  }
    156155
Note: See TracChangeset for help on using the changeset viewer.