]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix size parameter of memcpy.
authorUlrich Drepper <drepper@redhat.com>
Mon, 8 May 2000 15:21:25 +0000 (15:21 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 8 May 2000 15:21:25 +0000 (15:21 +0000)
posix/execle.c

index a8a016ee695c4ffc340e44d512ce26a807e67ecd..546063fcc704aad9c87b68626826feaf8fd55209 100644 (file)
@@ -48,7 +48,8 @@ execle (const char *path, const char *arg, ...)
          if ((char *) nptr + argv_max == (char *) argv)
            {
              /* Stack grows down.  */
-             argv = (const char **) memcpy (nptr, argv, i);
+             argv = (const char **) memcpy (nptr, argv,
+                                            i * sizeof (const char *));
              argv_max += i;
            }
          else
@@ -60,7 +61,8 @@ execle (const char *path, const char *arg, ...)
          else
 #endif
            /* We have a hole in the stack.  */
-           argv = (const char **) memcpy (nptr, argv, i);
+           argv = (const char **) memcpy (nptr, argv,
+                                          i * sizeof (const char *));
        }
 
       argv[i] = va_arg (args, const char *);