summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-09-29 15:29:39 -0400
committerChris Lumens <clumens@redhat.com>2008-09-29 15:29:39 -0400
commita834f8aaf20c6c7041f125fe371d83634530912c (patch)
treef63ba9f53e7b1d50112c89ef64180b17545df3cc /isys
parent21f2612ab8a94af37507983a4997755dd9542c54 (diff)
downloadanaconda-a834f8aaf20c6c7041f125fe371d83634530912c.tar.gz
anaconda-a834f8aaf20c6c7041f125fe371d83634530912c.tar.xz
anaconda-a834f8aaf20c6c7041f125fe371d83634530912c.zip
Another try at fixing up reading errors from mount.
Diffstat (limited to 'isys')
-rw-r--r--isys/imount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/isys/imount.c b/isys/imount.c
index 8ba1e668d..7655dc9b6 100644
--- a/isys/imount.c
+++ b/isys/imount.c
@@ -117,6 +117,8 @@ int doPwMount(char *dev, char *where, char *fs, char *options, char **err) {
*err = NULL;
}
+ memset(buf, '\0', 4096);
+
while ((rc = read(pipefd[0], &buf, 4096)) > 1) {
i += rc + 1;
@@ -124,7 +126,8 @@ int doPwMount(char *dev, char *where, char *fs, char *options, char **err) {
abort();
}
- *err = strncpy(*err, buf, rc);
+ *err = strncat(*err, buf, rc);
+ memset(buf, '\0', 4096);
}
}