We don't use the NUL terminator (presumably) copied by the strdup
variant, and it may not be valid anyway.

Change-Id: Ibce75aaaa8684f2ea5282c53ed8a546c7ff9b724
Signed-off-by: Dan Cross <[email protected]>
---
 kern/src/devfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kern/src/devfs.c b/kern/src/devfs.c
index f2dcbb5..8e2af71 100644
--- a/kern/src/devfs.c
+++ b/kern/src/devfs.c
@@ -100,7 +100,7 @@ ssize_t dev_stdout_write(struct file *file, const char 
*buf, size_t count,
        char *t_buf;
        struct proc *p = current;
        if (p)
-               t_buf = user_strdup_errno(p, buf, count);
+               t_buf = user_memdup_errno(p, buf, count);
        else
                t_buf = (char*)buf;
        if (!t_buf)
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to