From d4ec0a2d75dc9fd1506fe5e38b20e55ba17a1819 Mon Sep 17 00:00:00 2001 From: Josh Oguin Date: Wed, 19 Nov 2014 14:50:45 -0600 Subject: 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. --- cpukit/libmisc/monitor/mon-prmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3