diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-16 15:26:29 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-16 15:26:29 +0000 |
commit | b88691c30f077c08da83d925a8070b489c1bd2f0 (patch) | |
tree | 45a153d51bcbf28266fad8a268eba1a317d7fced /c/src/exec/libcsupport/src/scandir.c | |
parent | Added itron tests. (diff) | |
download | rtems-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/src/exec/libcsupport/src/scandir.c')
-rw-r--r-- | c/src/exec/libcsupport/src/scandir.c | 2 |
1 files changed, 1 insertions, 1 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. |