forked from Imagelibrary/rtems
+ Added check for name greater than PATH_MAX.
This commit is contained in:
@@ -48,6 +48,9 @@ int _POSIX_Message_queue_Name_to_id(
|
||||
if ( !name[0] )
|
||||
return EINVAL;
|
||||
|
||||
if( strlen(name) > PATH_MAX ) /* XXX - Is strlen ok to use here ? */
|
||||
return ENAMETOOLONG;
|
||||
|
||||
status = _Objects_Name_to_id(
|
||||
&_POSIX_Message_queue_Information, (char *)name, 0, id );
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ int _POSIX_Message_queue_Name_to_id(
|
||||
if ( !name[0] )
|
||||
return EINVAL;
|
||||
|
||||
if( strlen(name) > PATH_MAX ) /* XXX - Is strlen ok to use here ? */
|
||||
return ENAMETOOLONG;
|
||||
|
||||
status = _Objects_Name_to_id(
|
||||
&_POSIX_Message_queue_Information, (char *)name, 0, id );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user