Print this page
10151 mv_xattrs() checks for a NULL array name

@@ -21,10 +21,11 @@
 
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  * Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 #include "libcmdutils.h"
 
 

@@ -160,11 +161,10 @@
                 if (sattr) {
                         /*
                          * Gets non default extended system attributes from
                          * source to copy to target.
                          */
-                        if (dp->d_name != NULL)
                                 res = sysattr_list(cmd, sattrfd, dp->d_name);
 
                         if (res != NULL &&
                             get_attrdirs(indfd, outdfd, dp->d_name, &asfd,
                             &atfd) != 0) {