diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2000-07-23 16:54:18 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2000-07-23 16:54:18 +0000 |
| commit | 03567510a805f30de80fff8244292ad0ffa923e0 (patch) | |
| tree | bd79167115db008a3258410c3d885be57ae82250 /sys/compat/linux/linux_util.c | |
| parent | fa90cca2fc9e6ec15d0a457068c1d7579c11ff91 (diff) | |
Notes
Diffstat (limited to 'sys/compat/linux/linux_util.c')
| -rw-r--r-- | sys/compat/linux/linux_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 8faf35e3d80e..e0ea0cb5fb07 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -162,7 +162,10 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag) else { sz = &ptr[len] - buf; *pbuf = stackgap_alloc(sgp, sz + 1); - error = copyout(buf, *pbuf, sz); + if (*pbuf != NULL) + error = copyout(buf, *pbuf, sz); + else + error = ENAMETOOLONG; free(buf, M_TEMP); } |
