Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c	(revision 27562)
+++ subversion/libsvn_client/diff.c	(working copy)
@@ -1208,9 +1208,11 @@
   int levels_to_lock = levels_to_lock_from_depth(depth);
   svn_boolean_t server_supports_depth;
 
-  /* Assert that we have valid input. */
-  assert(! svn_path_is_url(path2));
-
+  /* Ensure that path2 is a working copy path. */  
+  if(svn_path_is_url(path2))
+    return svn_error_create(SVN_ERR_FS_PATH_SYNTAX, NULL,
+                            "Target must be a working copy path");
+  
   /* Convert path1 to a URL to feed to do_diff. */
   SVN_ERR(convert_to_url(&url1, path1, pool));
 
