Skip to content

Commit 1898cb0

Browse files
author
zhengshuxin
committed
fixed one bug in redis_command::run() if request_buf_ is NULL.
1 parent cd10474 commit 1898cb0

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ endif
8282
##############################################################################
8383

8484
.PHONY = check help all_lib all samples all clean install uninstall uninstall_all build_one
85-
VERSION = 3.5.3-14
85+
VERSION = 3.5.3-15
8686

8787
default: build_one acl_master
8888
help h:

lib_acl/src/init/acl_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "init.h"
2727

28-
static char *version = "3.5.3-14 20220615-15:00";
28+
static char *version = "3.5.3-15 20220709-17:38";
2929

3030
const char *acl_version(void)
3131
{

lib_acl_cpp/samples/redis/redis_pubsub/valgrind.sh

100644100755
File mode changed.

lib_acl_cpp/src/redis/redis_command.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,14 @@ const redis_result* redis_command::run(size_t nchild /* = 0 */,
387387
conn_->set_check_addr(check_addr_);
388388

389389
if (slice_req_) {
390+
if (request_obj_ == NULL) {
391+
request_obj_ = NEW redis_request();
392+
}
390393
result_ = conn_->run(dbuf_, *request_obj_, nchild, timeout);
391394
} else {
395+
if (request_buf_ == NULL) {
396+
request_buf_ = NEW string(128);
397+
}
392398
result_ = conn_->run(dbuf_, *request_buf_, nchild, timeout);
393399
}
394400
return result_;

packaging/acl-libs.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%define release_id 14
1+
%define release_id 15
22

33
Summary: The powerful c/c++ library
44
Name: acl-libs
@@ -47,6 +47,11 @@ rm -rf %{buildroot}
4747

4848
%changelog
4949

50+
* Sat Jul 09 2022 shuxin.zheng [email protected] 3.5.3-15-20220709.17
51+
- bugfix: fixed one crash bug that redis_command::request_buf_ will be NULL
52+
when calling redis_pubsub::get_message() first without calling
53+
redis_pubsub::subscribe() before.
54+
5055
* Wed Jun 15 2022 shuxin.zheng [email protected] 3.5.3-14-20220615.15
5156
- bugfix: fixed one bug in redis_client_pipeline.cpp about handling redirect message.
5257

0 commit comments

Comments
 (0)