diff options
-rw-r--r-- | cpukit/ChangeLog | 4 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_date.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 9b264efeae..c3489e73db 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,7 @@ +2010-08-27 Joel Sherrill <joel.sherrill@oarcorp.com> + + * libmisc/shell/main_date.c: Use snprintf() not sprintf(). + 2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com> PR 1693/filesystem diff --git a/cpukit/libmisc/shell/main_date.c b/cpukit/libmisc/shell/main_date.c index c91b938419..da6faa0e53 100644 --- a/cpukit/libmisc/shell/main_date.c +++ b/cpukit/libmisc/shell/main_date.c @@ -52,7 +52,7 @@ int rtems_shell_main_date( struct timespec timesp; char *result; - sprintf( buf, "%s %s", argv[1], argv[2] ); + snprintf( buf, sizeof(buf), "%s %s", argv[1], argv[2] ); result = strptime( buf, "%Y-%m-%d %T", |