change log for rtems (2011-03-15)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue Mar 15 16:10:26 UTC 2011
*joel*:
2011-03-15 Joel Sherrill <joel.sherrill at oarcorp.com>
* libmisc/shell/main_setenv.c: Revert after discussion. Mark as
intentional in Coverity.
M 1.2780 cpukit/ChangeLog
M 1.5 cpukit/libmisc/shell/main_setenv.c
diff -u rtems/cpukit/ChangeLog:1.2779 rtems/cpukit/ChangeLog:1.2780
--- rtems/cpukit/ChangeLog:1.2779 Tue Mar 15 10:05:28 2011
+++ rtems/cpukit/ChangeLog Tue Mar 15 10:43:09 2011
@@ -1,5 +1,10 @@
2011-03-15 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * libmisc/shell/main_setenv.c: Revert after discussion. Mark as
+ intentional in Coverity.
+
+2011-03-15 Joel Sherrill <joel.sherrill at oarcorp.com>
+
* libfs/src/dosfs/msdos_format.c: Address Coverity issue 183 which was
where an expression evaluated to a constant and issue 185 which was a
potential (although unlikely in expected usage) time-of-check,
diff -u rtems/cpukit/libmisc/shell/main_setenv.c:1.4 rtems/cpukit/libmisc/shell/main_setenv.c:1.5
--- rtems/cpukit/libmisc/shell/main_setenv.c:1.4 Tue Mar 15 10:02:41 2011
+++ rtems/cpukit/libmisc/shell/main_setenv.c Tue Mar 15 10:43:09 2011
@@ -16,13 +16,6 @@
#include <rtems/shell.h>
#include "internal.h"
-/*
- * Limit examining or copying more than 256 characters at a time.
- * Yes, this is very arbitrary. If there are POSIX constants, then
- * they should be used.
- */
-#define MAX 156
-
int rtems_shell_main_setenv(int argc, char *argv[])
{
char* env = NULL;
@@ -39,7 +32,7 @@
env = argv[1];
for (arg = 2; arg < argc; arg++)
- len += strnlen(argv[arg], MAX);
+ len += strlen(argv[arg]);
len += argc - 2 - 1;
@@ -51,8 +44,8 @@
}
for (arg = 2, p = string; arg < argc; arg++) {
- strncpy(p, argv[arg], MAX);
- p += strnlen(argv[arg], MAX);
+ strcpy(p, argv[arg]);
+ p += strlen(argv[arg]);
if (arg < (argc - 1)) {
*p = ' ';
p++;
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110315/b6d46d98/attachment-0001.html>
More information about the vc
mailing list