summaryrefslogtreecommitdiff
path: root/sds.c
AgeCommit message (Collapse)Author
2024-03-22all: use REUSE with LGPL-3.0-or-later and BSD-3-ClauseAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2023-06-01Add -Werror as a default. (#1193)Yossi Gottlieb
2022-02-02Handle overflows as errors instead of assertingBjörn Svensson
2022-02-01Catch size_t overflows in sds.cBjörn Svensson
Equivalent changes introduced to redis sds.c via: https://github.com/redis/redis/pull/8522 https://github.com/redis/redis/pull/9584
2022-02-01Use size_t/long to avoid truncationBjörn Svensson
Equivalent changes introduced to redis sds.c via: https://github.com/redis/redis/pull/4568
2020-09-26docs: Fix simple typo, termined -> terminatedTim Gates
There is a small typo in sds.c. Should read `terminated` rather than `termined`.
2020-06-07sdsrange overflow fix (#830)Michael Grunder
Fix overflow bug in `sdsrange`
2020-05-22Allow users to replace allocator and handle OOM everywhere. (#800)Michael Grunder
* Adds an indirection to every allocation/deallocation to allow users to plug in ones of their choosing (use custom functions, jemalloc, etc). * Gracefully handle OOM everywhere in hiredis. This should make it possible for users of the library to have more flexibility in how they handle such situations. * Changes `redisReaderTask->elements` from an `int` to a `long long` to prevent a possible overflow when transferring the task elements into a `redisReply`. * Adds a configurable `max elements` member to `redisReader` that defaults to 2^32 - 1. This can be set to "unlimited" by setting the value to zero.
2020-05-20Use standrad isxdigit instead of custom helper function. (#814)Muhammad Zahalqa
Standard function available and on most platforms uses a lookup table and not a check with 3 ranges.
2019-07-22Removed whitespace before newlineOdin Hultgren Van Der Horst
- Removed whitespace before newline - Removed win style newline
2018-03-17fix common realloc mistake and add null check morecharsyam
2016-12-09Avoid unchecked mallocJan-Erik Rediger
Closes #471
2016-04-20remove unnessory codecharsyam
2016-04-20remove unused codecharsyam
2016-04-20feat: Include latests changes from sds upstreamJan-Erik Rediger
2016-04-20apply sds from redisclark.kang
2015-10-28fixing typoscharsyam
2015-03-13Added support for compiling the parser code with Microsoft Visual C compiler.tzickel
For hiredis-py and others support on windows.
2015-01-05Cleanup tabs and end of line whitespaceMatt Stancliff
2015-01-05Improve redisAppendCommandArgv performancemichael-grunder
OK, perhaps the second time is a charm. I forgot that I had hiredis forked from a long time ago, so the initial pull request was hosed. :) * Pulled in sdscatfmt() from Redis, and modified it to accept a size_t (%T) style format specifier. * Pulled in sdsll2str() and sdsull2str() from Redis (needed by sdscatfmt). * Added a new method, redisFormatSdsCommandArgv() which takes and sds* as the target, rather than char* (and uses sdscatfmt instead of sprintf for the construction). I get roughly the following improvement: Old: 1.044806 New: 0.481620 The benchmark code itself can be found here: https://gist.github.com/michael-grunder/c92ef31bb632b3d0ad81 Closes #260
2015-01-05Fix minor comment problemsGary Grossman
"sdscatpritf" -> "sdscatprintf" Example used sdsempty("text") but should say sdsnew("text") Closes #282
2014-04-09Upgrade sds to latest versionantirez
SDS is now broken out of Redis into its own project, so include the latest version from the SDS repo. This is a backport of the Redis commit doing the same to the bundled hiredis: https://github.com/antirez/redis/commit/320fa02b9b48ee1c63d88db6344fc0d328e24853
2014-01-15sds.c: avoid leaking tokens when seplen < 1 || len < 0Charlie Somerville
2013-07-02va_copy must be followed by va_endRichard Fuchs
2011-04-21Fix sdscatreprPieter Noordhuis
2011-04-21Don't abort on OOM in sds.cPieter Noordhuis
2011-04-19Inline sdslen and sdsavail (thanks to @bitbckt)Pieter Noordhuis
2011-01-19Add testhelp.h inline in sds.cPieter Noordhuis
2011-01-19Update string libraryPieter Noordhuis
2010-09-20Update sds codePieter Noordhuis
2010-05-25Constify the API and enable -Wwrite-stringsPierre Riteau
The API is more similar to printf now.
2010-05-18hiredis was extracted from redis-tools, reverted to standard malloc/free, ↵antirez
ported to the new protocol, and started as a stand alone project in order to support the need of a C client in the Redis community