subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1354853 - /subversion/trunk/subversion/svn/log-cmd.c
Date Thu, 28 Jun 2012 08:20:19 GMT
Author: stsp
Date: Thu Jun 28 08:20:18 2012
New Revision: 1354853

URL: http://svn.apache.org/viewvc?rev=1354853&view=rev
Log:
* subversion/svn/log-cmd.c
  (match_search_pattern): Allow the AUTHOR to be NULL. Code inspection
   suggests that this might happen in XML output mode, so we should
   avoid this potential crash.

Modified:
    subversion/trunk/subversion/svn/log-cmd.c

Modified: subversion/trunk/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/log-cmd.c?rev=1354853&r1=1354852&r2=1354853&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/log-cmd.c (original)
+++ subversion/trunk/subversion/svn/log-cmd.c Thu Jun 28 08:20:18 2012
@@ -149,7 +149,7 @@ display_diff(const svn_log_entry_t *log_
 
 /* Return TRUE if SEARCH_PATTERN matches the AUTHOR, LOG_MESSAGE, or a path
  * in the set of keys of the CHANGED_PATHS hash. Else, return FALSE.
- * LOG_MESSAGE and CHANGED_PATHS are allowed to be NULL. */
+ * Any of AUTHOR, LOG_MESSAGE and CHANGED_PATHS are allowed to be NULL. */
 static svn_boolean_t
 match_search_pattern(const char *search_pattern,
                      const char *author,
@@ -163,7 +163,7 @@ match_search_pattern(const char *search_
   int flags = (case_insensitive_search ? APR_FNM_CASE_BLIND : 0);
 
   /* Does the author match the search pattern? */
-  if (apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
+  if (author && apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
     return TRUE;
 
   /* Does the log message the search pattern? */



Mime
View raw message