diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/src/exec/libcsupport/src/scandir.c | 2 | ||||
-rw-r--r-- | c/src/lib/libc/scandir.c | 2 |
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. |