Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Huber
8905201985 monitor: Replace puts() with proper fprintf() 2014-12-03 13:03:13 +01:00
Josh Oguin
90a8e42be4 monitor/mon-editor.c: Use puts() and snprintf() not fprintf() or sprintf()
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.

snprintf() places a limit on the length of the output from sprintf()
and avoids similar buffer overrun issues.
2014-11-26 07:51:59 -06:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Ralf Corsepius
b0f6b6c7fb 2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
*  libmisc/monitor/mon-editor.c (rtems_monitor_task):
	Comment out unused vars "debugee", "rp", "fp".
2011-10-17 13:50:05 +00:00
Joel Sherrill
0b95fb8057 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1559/misc
	Coverity Id 16
	* libmisc/monitor/mon-editor.c: Fix buffer overflow.
2010-06-21 16:25:09 +00:00
Ralf Corsepius
0893220b2a Whitespace removal. 2009-11-29 12:12:39 +00:00
Ralf Corsepius
fcb4f7a314 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/monitor/mon-editor.c: Eliminate RTEMS_UNIX.
2009-10-14 16:16:18 +00:00
Joel Sherrill
eb96196183 2008-12-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libblock/src/ide_part_table.c: Fixed NULL pointer access.
	* libmisc/monitor/mon-command.c, libmisc/monitor/mon-editor.c,
	libmisc/monitor/mon-monitor.c, libmisc/monitor/monitor.h,
	libmisc/shell/cmds.c: The list of registered monitor commands is now
	private and only accessible via a lookup and iterate function.
2008-12-19 14:59:35 +00:00
Joel Sherrill
e41eaa881a 2008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h:
	Fixed incompatible return value.

	* libmisc/cpuuse/cpuusagereport.c: Changed output format.

	* libmisc/Makefile.am, libmisc/monitor/mon-editor.c: New file.

	* libmisc/capture/capture-cli.c, libmisc/monitor/mon-command.c,
	libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c,
	libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-symbols.c,
	libmisc/monitor/monitor.h, libmisc/shell/cat_file.c,
	libmisc/shell/cmds.c, libmisc/shell/internal.h,
	libmisc/shell/main_help.c, libmisc/shell/shell.c,
	libmisc/shell/shell.h, libmisc/shell/shell_cmdset.c,
	libmisc/shell/shell_getchar.c, libmisc/shell/str2int.c: Various global
	data is now read only.  Added 'const' qualifier to many pointer
	parameters.  It is no longer possible to remove monitor commands.
	Moved monitor line editor into a separate file to avoid unnecessary
	dependencies.
2008-12-18 15:25:27 +00:00