summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 15:26:29 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 15:26:29 +0000
commitb88691c30f077c08da83d925a8070b489c1bd2f0 (patch)
tree45a153d51bcbf28266fad8a268eba1a317d7fced /c
parentc276c871111aebe4c98b734d2a285f72883d21fd (diff)
downloadrtems-b88691c30f077c08da83d925a8070b489c1bd2f0.tar.bz2
Source and destination arguments to strncpy were swapped. This mistake
was made in the conversion of bcopy() to strncpy().
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/libcsupport/src/scandir.c2
-rw-r--r--c/src/lib/libc/scandir.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/c/src/exec/libcsupport/src/scandir.c b/c/src/exec/libcsupport/src/scandir.c
index 25f3263187..43c7c51747 100644
--- a/c/src/exec/libcsupport/src/scandir.c
+++ b/c/src/exec/libcsupport/src/scandir.c
@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
- strncpy(d->d_name, p->d_name, p->d_namlen + 1);
+ strncpy(p->d_name, d->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.
diff --git a/c/src/lib/libc/scandir.c b/c/src/lib/libc/scandir.c
index 25f3263187..43c7c51747 100644
--- a/c/src/lib/libc/scandir.c
+++ b/c/src/lib/libc/scandir.c
@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
- strncpy(d->d_name, p->d_name, p->d_namlen + 1);
+ strncpy(p->d_name, d->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.