Author: andrew
Date: Tue Feb  2 10:11:56 2016
New Revision: 295140
URL: https://svnweb.freebsd.org/changeset/base/295140

Log:
  Correctly handle the case where copystr(9) is given a string longer than
  the passed in length. In this case we need to return ENAMETOOLONG.

Modified:
  head/sys/arm64/arm64/copystr.c

Modified: head/sys/arm64/arm64/copystr.c
==============================================================================
--- head/sys/arm64/arm64/copystr.c      Tue Feb  2 10:02:38 2016        
(r295139)
+++ head/sys/arm64/arm64/copystr.c      Tue Feb  2 10:11:56 2016        
(r295140)
@@ -56,6 +56,6 @@ copystr(const void * __restrict kfaddr, 
        if (lencopied != NULL)
                *lencopied = pos;
 
-       return (0);
+       return (error);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to