Skip to content

Commit 9ef9bb8

Browse files
committed
fixup: re-add buflen check
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
1 parent 94663f7 commit 9ef9bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/async.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ static const char *parseBulkLen(const char *p, const char *end, uint64_t *len) {
844844
* finding following arguments, or NULL when an argument is not found.
845845
* The found string is returned by pointer via `str` and length in `strlen`. */
846846
static const char *nextArgument(const char *buf, size_t buflen, const char **str, size_t *strlen) {
847-
if (buf == NULL)
847+
if (buf == NULL || buflen == 0)
848848
goto error;
849849

850850
const char *p = buf;

0 commit comments

Comments
 (0)