Skip to content

Commit d4dbc2b

Browse files
committed
correct the compression_factor calculation
1 parent 0986493 commit d4dbc2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_memcached.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ zend_bool s_compress_value (php_memc_compression_type compression_type, zend_str
852852
}
853853

854854
/* This means the value was too small to be compressed, still a success */
855-
if (compressed_size > (payload->len * MEMC_G(compression_factor))) {
855+
if (payload->len < (compressed_size * MEMC_G(compression_factor))) {
856856
MEMC_VAL_DEL_FLAG(*flags, MEMC_VAL_COMPRESSED);
857857
efree (buffer);
858858
return 1;

0 commit comments

Comments
 (0)