summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-06-09 16:46:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-06-09 16:46:13 +0000
commit0860426d39bba9580fefe88534d35797fa59f8e5 (patch)
tree9a3f1e03c7456299231ba7c55949afd7e8c95122 /c
parentSwitched to using strcasecmp() since it is more portable. (diff)
downloadrtems-0860426d39bba9580fefe88534d35797fa59f8e5.tar.bz2
Modified to return an error when a bogus return address for the
old_priority parameter is provided.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/rtems/src/tasksetpriority.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/exec/rtems/src/tasksetpriority.c b/c/src/exec/rtems/src/tasksetpriority.c
index f79ad581a5..546ea3d537 100644
--- a/c/src/exec/rtems/src/tasksetpriority.c
+++ b/c/src/exec/rtems/src/tasksetpriority.c
@@ -61,6 +61,9 @@ rtems_status_code rtems_task_set_priority(
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
+ if ( !old_priority )
+ return RTEMS_INVALID_ADDRESS;
+
the_thread = _Thread_Get( id, &location );
switch ( location ) {