redict/src
Haruto Otake 749aac72ad BITCOUNT: fix segmentation fault.
remove unsafe and unnecessary cast.
until now, this cast may lead segmentation fault when end > UINT_MAX

setbit foo 0 1
bitcount  0 4294967295
=> ok
bitcount  0 4294967296
=> cause segmentation fault.

Note by @antirez: the commit was modified a bit to also change the
string length type to long, since it's guaranteed to be at max 512 MB in
size, so we can work with the same type across all the code path.

A regression test was also added.
2012-09-05 16:19:04 +02:00
..
.gitignore Ignore gcov/lcov artifacts 2012-04-13 17:52:33 -07:00
adlist.c Process async client checks like client timeouts and BLPOP timeouts incrementally using a circular list. 2012-03-13 18:05:11 +01:00
adlist.h Process async client checks like client timeouts and BLPOP timeouts incrementally using a circular list. 2012-03-13 18:05:11 +01:00
ae_epoll.c mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait. 2012-06-29 12:06:38 +08:00
ae_evport.c Whitespace 2012-05-15 11:19:01 +02:00
ae_kqueue.c Max limit to 10k clients removed, this implements feature request on issue #194 2011-12-15 11:42:40 +01:00
ae_select.c redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
ae.c Set fd to writable when poll(2) detects POLLERR or POLLHUP event. 2012-05-23 11:33:32 +02:00
ae.h Max limit to 10k clients removed, this implements feature request on issue #194 2011-12-15 11:42:40 +01:00
anet.c First implementation of Redis Sentinel. 2012-07-23 13:14:44 +02:00
anet.h Added a config directive for a Unix socket mask 2011-10-10 11:21:15 -07:00
aof.c Merge pull request #587 from saj/truncate-short-write-from-aof 2012-07-27 03:56:48 -07:00
asciilogo.h ASCII ART FTW 2011-04-13 10:58:21 +02:00
bio.c Mask SIGALRM everything but in the main thread. 2012-03-27 13:48:57 +02:00
bio.h REDIS_BIO_AOF_FSYNC implemented 2011-09-15 18:25:53 +02:00
bitops.c BITCOUNT: fix segmentation fault. 2012-09-05 16:19:04 +02:00
cluster.c Better Out of Memory handling. 2012-08-24 12:55:37 +02:00
config.c Sentinel: Redis-side support for slave priority. 2012-08-28 17:20:26 +02:00
config.h Incrementally flush RDB on disk while loading it from a master. 2012-08-28 12:47:33 +02:00
crc16.c Exact variant of CRC16 specified into crc16.c 2011-10-02 14:05:29 +02:00
crc64.c crc64.c modified for incremental computation. 2012-04-09 12:20:47 +02:00
db.c Use safe dictionary iterator from KEYS 2012-05-01 10:52:03 +02:00
debug.c Better Out of Memory handling. 2012-08-24 12:55:37 +02:00
dict.c Even inside #if 0 comments are comments. 2012-04-21 21:49:21 +02:00
dict.h Fix for hash table collision attack. We simply randomize hash table initialization value at startup time. 2012-01-21 23:30:13 +01:00
endianconv.c endian.c/h -> endianconv.c/h to avoid issues with broken libraries search paths. 2012-02-14 16:11:46 +01:00
endianconv.h Add stdint.h in endianconv.h to fix issue #336. 2012-02-15 12:21:04 +01:00
fmacros.h Incrementally flush RDB on disk while loading it from a master. 2012-08-28 12:47:33 +02:00
help.h redis-cli commands description in help.h updated. 2012-04-27 15:57:27 +02:00
intset.c endian.c/h -> endianconv.c/h to avoid issues with broken libraries search paths. 2012-02-14 16:11:46 +01:00
intset.h encoded types API to get blob length 2011-02-28 14:48:49 +01:00
lzf_c.c redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
lzf_d.c redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
lzf.h redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
lzfP.h redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
Makefile First implementation of Redis Sentinel. 2012-07-23 13:14:44 +02:00
Makefile.dep Makefile.dep updated. 2012-04-11 12:12:30 +02:00
memtest.c memtest.c fixed to actually use v1 and v2 in memtest_fill_value(). 2012-04-27 16:29:44 +02:00
mkreleasehdr.sh redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
multi.c Support for read-only slaves. Semantical fixes. 2012-03-20 17:32:48 +01:00
networking.c REPLCONF internal command introduced. 2012-06-27 09:43:57 +02:00
object.c remove mentions of VM in comments 2012-04-02 11:56:03 +02:00
pqsort.c redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
pqsort.h redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
pubsub.c Use less memory when emitting the protocol, by using more shared objects for commonly emitted parts of the protocol. 2012-02-04 08:58:37 +01:00
rand.c libc neutral random function derived from a drand48() implementation added. Will be used to replace Lua's math.random implementation. 2011-09-23 14:51:48 +02:00
rand.h Defined macro with bigger number that redisLrand48() can output. 2011-09-23 15:06:07 +02:00
rdb.c RDB type loading functions clarified in comments. 2012-06-02 10:21:57 +02:00
rdb.h Fixed RESTORE hash failure (Issue #532) 2012-06-02 10:24:27 +02:00
redis-benchmark.c redis-benchmark: disable big buffer cleanup in hiredis context. 2012-08-21 17:31:44 +02:00
redis-check-aof.c redis-check-aof is now large files safe also on 32 bit systems. 2012-02-14 19:57:51 +01:00
redis-check-dump.c redis-check-dump now is RDB version 6 ready. 2012-04-24 19:05:27 +02:00
redis-cli.c Check that we have connection before enabling pipe mode 2012-07-15 14:35:02 +02:00
redis-trib.rb redis-trib: fix the MIGRATE call that now has milliseconds timeout (were seconds before). 2012-03-31 11:28:37 +02:00
redis.c Scripting: Force SORT BY constant determinism inside SORT itself. 2012-09-05 01:17:49 +02:00
redis.h Merge pull request #576 from saj/fix-slave-ping-period 2012-09-05 06:59:37 -07:00
release.c redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
replication.c Merge pull request #576 from saj/fix-slave-ping-period 2012-09-05 06:59:37 -07:00
rio.c Fixed compilation of new rio.c changes (typos and so forth.) 2012-04-09 12:36:44 +02:00
rio.h Make inline functions rioRead/Write/Tell static. This fixes issue #447. 2012-04-11 11:58:32 +02:00
scripting.c Scripting: Force SORT BY constant determinism inside SORT itself. 2012-09-05 01:17:49 +02:00
sds.c Added consts keyword where possible 2012-03-30 21:19:51 +02:00
sds.h Added consts keyword where possible 2012-03-30 21:19:51 +02:00
sentinel.c Sentinel: reply -IDONTKNOW to get-master-addr-by-name on lack of info. 2012-09-04 16:06:53 +02:00
sha1.c byte ordering detection in config.h 2011-03-09 15:44:21 +01:00
sha1.h redis.c split into many different C files. 2010-07-01 14:38:51 +02:00
slowlog.c Limit memory used by big SLOWLOG entries. 2012-04-21 20:34:45 +02:00
slowlog.h Limit memory used by big SLOWLOG entries. 2012-04-21 20:34:45 +02:00
solarisfixes.h Fix for solaris compilation bug Issue 325 2010-09-06 10:12:44 +02:00
sort.c Scripting: Force SORT BY constant determinism inside SORT itself. 2012-09-05 01:17:49 +02:00
syncio.c syncio.c read / write functions reworked for correctness and performance. 2012-05-02 22:41:50 +02:00
t_hash.c Dump ziplist hex value on failed assertion. 2012-06-12 00:41:48 +02:00
t_list.c Document mostly dead code in RPOPLPUSH implementation. 2012-04-18 17:38:02 +02:00
t_set.c Fixed some spelling errors in the comments 2012-04-07 14:40:29 +02:00
t_string.c Bit-related string operations moved to bitop.c 2012-05-24 15:19:51 +02:00
t_zset.c Fixed issue #516 (ZINTERSTORE mixing sets and zsets). 2012-05-23 11:12:43 +02:00
testhelp.h testhelp.h now exits with retcode 1 on failed tests. 2011-11-02 16:52:10 +01:00
util.c Use correct variable name for value to convert. 2012-07-31 11:48:00 +02:00
util.h string2* functions take a const pointer 2012-01-02 15:24:50 -08:00
valgrind.sup more valgrind friendly test 2011-07-06 15:22:00 +02:00
version.h Version 2.9.7. 2012-04-10 16:34:33 +02:00
ziplist.c Set p to its new offset before modifying it 2012-08-13 14:13:09 -07:00
ziplist.h Implements ziplistFind 2012-01-03 16:13:42 -08:00
zipmap.c Fixed some spelling errors in the comments 2012-04-07 14:40:29 +02:00
zipmap.h save zipmap encoded hashes as blobs. Work in progress. 2011-02-28 09:56:48 +01:00
zmalloc.c Fix a forget zmalloc_oom() -> zmalloc_oom_handler() replacement. 2012-08-24 15:40:22 +02:00
zmalloc.h Better Out of Memory handling. 2012-08-24 12:55:37 +02:00