[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] fix for programmer error in path split text logic

From: Eric Lubin <eric_at_lubin.us>
Date: Thu, 5 Dec 2013 15:16:56 -0500

Index: subversion/libsvn_subr/path.c
===================================================================
--- subversion/libsvn_subr/path.c (revision 1548158)
+++ subversion/libsvn_subr/path.c (working copy)
@@ -1252,7 +1252,7 @@ svn_path_splitext(const char **path_root,
      anything after it? We look for the "rightmost" period in the
      string. */
   last_dot = strrchr(path, '.');
- if (last_dot && (last_dot + 1 != '\0'))
+ if (last_dot && (*(last_dot + 1) != '\0'))
     {
       /* If we have a period, we need to make sure it occurs in the
          final path component -- that there's no path separator

[[[
 * subversion/libsvn_subr/path.c
   (svn_path_splitext): Fixed ncorrect pointer comparison to NULL to check for end of string, instead of checking if the character itself was NULL
]]]
Received on 2013-12-06 07:03:37 CET

This is an archived mail posted to the Subversion Dev mailing list.