<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-08-27)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-26 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libcsupport/src/mount.c: Avoid strcpy().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2608&r2=text&tr2=1.2609&diff_format=h">M</a></td><td width='1%'>1.2609</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mount.c.diff?r1=text&tr1=1.40&r2=text&tr2=1.41&diff_format=h">M</a></td><td width='1%'>1.41</td><td width='100%'>cpukit/libcsupport/src/mount.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2608 rtems/cpukit/ChangeLog:1.2609
--- rtems/cpukit/ChangeLog:1.2608       Thu Aug 26 16:42:21 2010
+++ rtems/cpukit/ChangeLog      Fri Aug 27 01:29:25 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-08-26    Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * libcsupport/src/mount.c: Avoid strcpy().
+
</font> 2010-08-26        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * libcsupport/src/sync.c: Add comment explaining why the return value

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount.c:1.40 rtems/cpukit/libcsupport/src/mount.c:1.41
--- rtems/cpukit/libcsupport/src/mount.c:1.40   Sun Jul  4 09:53:44 2010
+++ rtems/cpukit/libcsupport/src/mount.c        Fri Aug 27 01:29:26 2010
</font><font color='#997700'>@@ -74,29 +74,27 @@
</font>   size_t filesystemtype_size = strlen( filesystemtype ) + 1;
   size_t source_size = source_or_null != NULL ?
     strlen( source_or_null ) + 1 : 0;
<font color='#880000'>-  size_t target_length = strlen( target );
</font><font color='#000088'>+  size_t target_size = strlen( target ) + 1;
</font>   size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
<font color='#880000'>-    + filesystemtype_size + source_size + target_length + 1;
</font><font color='#000088'>+    + filesystemtype_size + source_size + target_size;
</font>   rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
 
   if ( mt_entry != NULL ) {
     char *str = (char *) mt_entry + sizeof( *mt_entry );
 
<font color='#880000'>-    strcpy( str, filesystemtype );
</font><font color='#000088'>+    memcpy( str, filesystemtype, filesystemtype_size );
</font>     mt_entry->type = str;
     str += filesystemtype_size;
 
<font color='#880000'>-    if ( source_or_null != NULL ) {
-      strcpy( str, source_or_null );
-      mt_entry->dev = str;
-      str += source_size;
-    }
</font><font color='#000088'>+    memcpy( str, source_or_null, source_size );
+    mt_entry->dev = str;
+    str += source_size;
</font> 
<font color='#880000'>-    strcpy( str, target );
</font><font color='#000088'>+    memcpy( str, target, target_size );
</font>     mt_entry->target = str;
   }
 
<font color='#880000'>-  *target_length_ptr = target_length;
</font><font color='#000088'>+  *target_length_ptr = target_size - 1;
</font> 
   return mt_entry;
 }
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-26 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libcsupport/src/mount.c, libcsupport/src/mount-mgr.c: Avoid
        strcpy().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2609&r2=text&tr2=1.2610&diff_format=h">M</a></td><td width='1%'>1.2610</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mount-mgr.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/libcsupport/src/mount-mgr.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2609 rtems/cpukit/ChangeLog:1.2610
--- rtems/cpukit/ChangeLog:1.2609       Fri Aug 27 01:29:25 2010
+++ rtems/cpukit/ChangeLog      Fri Aug 27 01:41:07 2010
</font><font color='#997700'>@@ -1,6 +1,7 @@
</font> 2010-08-26        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
<font color='#880000'>-   * libcsupport/src/mount.c: Avoid strcpy().
</font><font color='#000088'>+      * libcsupport/src/mount.c, libcsupport/src/mount-mgr.c: Avoid
+       strcpy().
</font> 
 2010-08-26     Joel Sherrill <joel.sherrill@oarcorp.com>
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount-mgr.c:1.5 rtems/cpukit/libcsupport/src/mount-mgr.c:1.6
--- rtems/cpukit/libcsupport/src/mount-mgr.c:1.5        Sun Jul  4 09:53:44 2010
+++ rtems/cpukit/libcsupport/src/mount-mgr.c    Fri Aug 27 01:41:08 2010
</font><font color='#997700'>@@ -110,14 +110,15 @@
</font>   rtems_filesystem_fsmount_me_t  mount_h
 )
 {
<font color='#880000'>-  size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
</font><font color='#000088'>+  size_t type_size = strlen(type) + 1;
+  size_t fsn_size = sizeof( filesystem_node ) + type_size;
</font>   filesystem_node *fsn = malloc( fsn_size );
<font color='#880000'>-  char *type_storage = (char *) fsn + sizeof( filesystem_node );
</font><font color='#000088'>+  char *type_storage = (char *) fsn + sizeof( *fsn );
</font> 
   if ( fsn == NULL )
     rtems_set_errno_and_return_minus_one( ENOMEM );
 
<font color='#880000'>-  strcpy(type_storage, type);
</font><font color='#000088'>+  memcpy(type_storage, type, type_size);
</font>   fsn->entry.type = type_storage;
   fsn->entry.mount_h = mount_h;
 
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-08-26 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libfs/src/defaults/default_evalpath.c,
        libfs/src/defaults/default_evaluate_link.c: Removed superfluous
        assignment.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2610&r2=text&tr2=1.2611&diff_format=h">M</a></td><td width='1%'>1.2611</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/defaults/default_evalpath.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libfs/src/defaults/default_evalpath.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/defaults/default_evaluate_link.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/libfs/src/defaults/default_evaluate_link.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2610 rtems/cpukit/ChangeLog:1.2611
--- rtems/cpukit/ChangeLog:1.2610       Fri Aug 27 01:41:07 2010
+++ rtems/cpukit/ChangeLog      Fri Aug 27 01:42:45 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-08-26        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
<font color='#000088'>+   * libfs/src/defaults/default_evalpath.c,
+       libfs/src/defaults/default_evaluate_link.c: Removed superfluous
+       assignment.
+
+2010-08-26     Sebastian Huber <sebastian.huber@embedded-brains.de>
+
</font>   * libcsupport/src/mount.c, libcsupport/src/mount-mgr.c: Avoid
        strcpy().
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/defaults/default_evalpath.c:1.3 rtems/cpukit/libfs/src/defaults/default_evalpath.c:1.4
--- rtems/cpukit/libfs/src/defaults/default_evalpath.c:1.3      Tue Jun 29 14:37:28 2010
+++ rtems/cpukit/libfs/src/defaults/default_evalpath.c  Fri Aug 27 01:42:45 2010
</font><font color='#997700'>@@ -20,7 +20,6 @@
</font>   rtems_filesystem_location_info_t  *pathloc        /* IN/OUT */
 )
 {
<font color='#880000'>-  pathloc = NULL;
</font>   rtems_set_errno_and_return_minus_one( ENOTSUP );
 }
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/defaults/default_evaluate_link.c:1.1 rtems/cpukit/libfs/src/defaults/default_evaluate_link.c:1.2
--- rtems/cpukit/libfs/src/defaults/default_evaluate_link.c:1.1 Tue Jun 29 14:37:28 2010
+++ rtems/cpukit/libfs/src/defaults/default_evaluate_link.c     Fri Aug 27 01:42:46 2010
</font><font color='#997700'>@@ -18,7 +18,6 @@
</font>   int                               flags        /* IN     */
 )
 {
<font color='#880000'>-  pathloc = NULL;
</font>   rtems_set_errno_and_return_minus_one( ENOTSUP );
 }
 
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>