[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 file equality check due to pointer logic

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

Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 1548158)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -4614,7 +4614,7 @@ contents_three_identical_p(svn_boolean_t *identica
 
       /* As long as a file is not at the end yet, and it is still
        * potentially identical to another file, we read the next chunk.*/
- if (!eof1 && (identical_p12 || identical_p13))
+ if (!eof1 && (*identical_p12 || *identical_p13))
         {
           err = svn_io_file_read_full2(file1_h, buf1,
                                    SVN__STREAM_CHUNK_SIZE, &bytes_read1,
@@ -4624,7 +4624,7 @@ contents_three_identical_p(svn_boolean_t *identica
           read_1 = TRUE;
         }
 
- if (!eof2 && (identical_p12 || identical_p23))
+ if (!eof2 && (*identical_p12 || *identical_p23))
         {
           err = svn_io_file_read_full2(file2_h, buf2,
                                    SVN__STREAM_CHUNK_SIZE, &bytes_read2,
@@ -4634,7 +4634,7 @@ contents_three_identical_p(svn_boolean_t *identica
           read_2 = TRUE;
         }
 
- if (!eof3 && (identical_p13 || identical_p23))
+ if (!eof3 && (*identical_p13 || *identical_p23))
         {
           err = svn_io_file_read_full2(file3_h, buf3,
                                    SVN__STREAM_CHUNK_SIZE, &bytes_read3,

[[[
* subversion/libsvn_subr/io.c
  (contents_three_identical_p): Fixed incorrect pointer check against NULL, when the purpose was actually to check the value stored at that pointer for true or false
]]]
Received on 2013-12-06 07:04:49 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.