Changeset afebb3f in rtems


Ignore:
Timestamp:
Dec 23, 1999, 10:10:13 PM (20 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
2e97c01
Parents:
7fbef786
Message:

+ Added check for name greater than PATH_MAX

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/semaphorecreatesupp.c

    r7fbef786 rafebb3f  
    4242    _Thread_Enable_dispatch();
    4343    set_errno_and_return_minus_one( ENOSYS );
     44  }
     45
     46  if ( name ) {
     47
     48    if( strlen(name) > PATH_MAX ) {  /* XXX - Is strlen ok to use here ? */
     49      _Thread_Enable_dispatch();
     50      set_errno_and_return_minus_one( ENAMETOOLONG );
     51    }
     52
     53    /*
     54     * XXX Greater than NAME_MAX while POSIX_NO_TRUNC in effect.
     55     * XXX Error description in POSIX book different for mq_open and mq_unlink
     56     *     Why???
     57     */
    4458  }
    4559
  • cpukit/posix/src/semaphorecreatesupp.c

    r7fbef786 rafebb3f  
    4242    _Thread_Enable_dispatch();
    4343    set_errno_and_return_minus_one( ENOSYS );
     44  }
     45
     46  if ( name ) {
     47
     48    if( strlen(name) > PATH_MAX ) {  /* XXX - Is strlen ok to use here ? */
     49      _Thread_Enable_dispatch();
     50      set_errno_and_return_minus_one( ENAMETOOLONG );
     51    }
     52
     53    /*
     54     * XXX Greater than NAME_MAX while POSIX_NO_TRUNC in effect.
     55     * XXX Error description in POSIX book different for mq_open and mq_unlink
     56     *     Why???
     57     */
    4458  }
    4559
Note: See TracChangeset for help on using the changeset viewer.