Check error returns from strupper_m() (in all reasonable places).
[metze/samba/wip.git] / source3 / modules / vfs_streams_xattr.c
index 291531e59aae01744706b5ed46106405272f09d6..dd1135d77ccbb82a4f23207710fbd455523431a6 100644 (file)
@@ -119,7 +119,9 @@ static NTSTATUS streams_xattr_get_name(TALLOC_CTX *ctx,
                }
        } else {
                /* Normalize the stream type to upercase. */
-               strupper_m(strrchr_m(*xattr_name, ':') + 1);
+               if (!strupper_m(strrchr_m(*xattr_name, ':') + 1)) {
+                       return NT_STATUS_INVALID_PARAMETER;
+               }
        }
 
        DEBUG(10, ("xattr_name: %s, stream_name: %s\n", *xattr_name,