You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2017/07/14 12:12:57 UTC

svn commit: r1801945 - /subversion/trunk/subversion/libsvn_subr/compress.c

Author: kotkov
Date: Fri Jul 14 12:12:57 2017
New Revision: 1801945

URL: http://svn.apache.org/viewvc?rev=1801945&view=rev
Log:
* subversion/libsvn_subr/compress.c
  (svn__compress_lz4): Add an explicit cast when comparing signed and
   unsigned integer values.  This cast to int is safe, as the contract
   of the function only allows blocks <= LZ4_MAX_INPUT_SIZE.

Modified:
    subversion/trunk/subversion/libsvn_subr/compress.c

Modified: subversion/trunk/subversion/libsvn_subr/compress.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/compress.c?rev=1801945&r1=1801944&r2=1801945&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/compress.c (original)
+++ subversion/trunk/subversion/libsvn_subr/compress.c Fri Jul 14 12:12:57 2017
@@ -307,7 +307,7 @@ svn__compress_lz4(const void *data, apr_
   if (!compressed_data_len)
     return svn_error_create(SVN_ERR_LZ4_COMPRESSION_FAILED, NULL, NULL);
 
-  if (compressed_data_len >= len)
+  if (compressed_data_len >= (int)len)
     {
       /* Compression didn't help :(, just append the original text */
       svn_stringbuf_appendbytes(out, data, len);