diff options
author | michael-grunder <michael.grunder@gmail.com> | 2020-06-26 18:36:30 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2020-06-26 18:36:30 +0300 |
commit | 57bb95bf5a01a2adb74e2bf73bb285488e0d1586 (patch) | |
tree | 2aac3332f397ef5d197d7c82d3c9cd9d51758658 /library.c | |
parent | 262cc70e9e4adac13dc4956aef7374e7520fd5d2 (diff) |
Also NULL terminate if format is NULL
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -777,8 +777,10 @@ redis_pool_spprintf(RedisSock *redis_sock, char *fmt, ...) { smart_str_append_long(&str, (zend_long)redis_sock->port); /* Short circuit if we don't have a pattern */ - if (fmt == NULL) + if (fmt == NULL) { + smart_str_0(&str); return str.s; + } while (*fmt) { switch (*fmt) { |