]> andersk Git - openssh.git/commitdiff
- (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and
authormouring <mouring>
Mon, 19 Feb 2001 19:54:43 +0000 (19:54 +0000)
committermouring <mouring>
Mon, 19 Feb 2001 19:54:43 +0000 (19:54 +0000)
   getcwd.c.

ChangeLog
openbsd-compat/getcwd.c
openbsd-compat/setenv.c

index 2fe02aaaf136688a3500ed83c77a72db12180f2c..914482fc480107d31362ac7110b81089f095d95c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20010220
+ - (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and
+   getcwd.c.
+
 20010219
  - (bal) Markus' blessing to rename login.[ch] -> sshlogin.[ch] and
    pty.[ch] -> sshpty.[ch]
index 273a0487cda988ff8b8d5e3d271e928cd250be0a..de3baccbbbaa4707ed9bf4b16f4aeb4af2aa4f3e 100644 (file)
@@ -119,7 +119,7 @@ getcwd(char *pt,size_t size)
                         * path to the beginning of the buffer, but it's always
                         * been that way and stuff would probably break.
                         */
-                       memmove(bpt, pt, ept - bpt);
+                       memmove(pt, bpt, ept - bpt);
                        free(up);
                        return (pt);
                }
@@ -170,7 +170,7 @@ getcwd(char *pt,size_t size)
                                        goto notfound;
                                if (ISDOT(dp))
                                        continue;
-                               memmove(dp->d_name, bup, dp->d_namlen + 1);
+                               memmove(bup, dp->d_name, dp->d_namlen + 1);
 
                                /* Save the first error for later. */
                                if (lstat(up, &s)) {
@@ -202,13 +202,13 @@ getcwd(char *pt,size_t size)
                        pt = npt;
                        bpt = pt + off;
                        ept = pt + ptsize;
-                       memmove(bpt, ept - len, len);
+                       memmove(ept - len, bpt, len);
                        bpt = ept - len;
                }
                if (!first)
                        *--bpt = '/';
                bpt -= dp->d_namlen;
-               memmove(dp->d_name, bpt, dp->d_namlen);
+               memmove(bpt, dp->d_name, dp->d_namlen);
                (void)closedir(dir);
 
                /* Truncate any file name. */
index d69f88258b81c6f0ecaad1bc7d40fef2d9818425..ac9670baf9133a7abdd2b0d9e0f271c18d445fd0 100644 (file)
@@ -122,7 +122,7 @@ setenv(name, value, rewrite)
                            (cnt + 2)));
                        if (!P)
                                return (-1);
-                       memmove(environ, P, cnt * sizeof(char *));
+                       memmove(P, environ, cnt * sizeof(char *));
                        environ = P;
                }
                environ[cnt + 1] = NULL;
This page took 0.053602 seconds and 5 git commands to generate.