8000 Minor refactor of ignroe numbers option · phpredis/phpredis@29e5cf0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29e5cf0

Browse files
Minor refactor of ignroe numbers option
* We want to run the logic if either a serializer OR a compression option is set. * IEE754 doubles can theoretically have a huge number of characters.
1 parent f9ce942 commit 29e5cf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3882,10 +3882,10 @@ redis_unpack(RedisSock *redis_sock, const char *src, int srclen, zval *zdst) {
38823882
size_t len;
38833883
char *buf;
38843884

3885-
if (UNEXPECTED((redis_sock->serializer != REDIS_SERIALIZER_NONE &&
3885+
if (UNEXPECTED((redis_sock->serializer != REDIS_SERIALIZER_NONE ||
38863886
redis_sock->compression != REDIS_COMPRESSION_NONE) &&
38873887
redis_sock->pack_ignore_numbers) &&
3888-
srclen > 0 && srclen < 24)
3888+
srclen > 0 && srclen < 512)
38893889
{
38903890
switch (is_numeric_string(src, srclen, &lval, &dval, 0)) {
38913891
case IS_LONG:

0 commit comments

Comments
 (0)
0