summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Oguin <josh.oguin@oarcorp.com>2014-11-19 14:50:45 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-26 07:52:00 -0600
commitd4ec0a2d75dc9fd1506fe5e38b20e55ba17a1819 (patch)
treeee8cd05e645d057c02e69ff177d7277d7cce1716
parentobjectgetnameasstring.c: Reformat _Objects_Get() switch to follow pattern (diff)
downloadrtems-d4ec0a2d75dc9fd1506fe5e38b20e55ba17a1819.tar.bz2
monitor/mon-prmisc.c: Use puts() not fprintf()
CodeSonar flagged this as a case where the user could inject a format string and cause issues. Since we were not printing anything but a string, just switching to puts() rather than fprintf(stdout,...) was sufficient to make this code safer.
-rw-r--r--cpukit/libmisc/monitor/mon-prmisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
index b22ae550ed..8607974815 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -103,7 +103,7 @@ rtems_monitor_dump_name(rtems_id id)
rtems_object_get_name( id, sizeof(name_buffer), name_buffer );
- return fprintf( stdout, name_buffer );
+ return puts( name_buffer );
}
int