forked from Imagelibrary/rtems
Source and destination arguments to strncpy were swapped. This mistake
was made in the conversion of bcopy() to strncpy().
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user