summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2020-09-21 11:20:29 -0700
committerGitHub <noreply@github.com>2020-09-21 11:20:29 -0700
commit13e7f58a1658636202994e3298237edefb985919 (patch)
treedf2194b31dae4510ec83e8edd4a631cd1053ca6c
parente89ffb2a81a000471fe6b558d93a4437656b30f9 (diff)
parent0c032f5f4f826199868099f0af10c4a913209573 (diff)
downloadopen-iscsi-13e7f58a1658636202994e3298237edefb985919.tar.gz
Merge pull request #224 from cleech/for_upstream
iscsiadm buffer overflow regression when discovering many targets at …
-rw-r--r--usr/idbm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/idbm.c b/usr/idbm.c
index 6309be0..42c2699 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -169,6 +169,7 @@ static struct idbm *db;
#define __recinfo_int_list(_key,_info,_rec,_name,_show,_tbl,_n,_mod) do { \
_info[_n].type = TYPE_INT_LIST; \
strlcpy(_info[_n].name, _key, NAME_MAXVAL); \
+ _info[_n].value[0] = '\0'; \
for (unsigned long _i = 0; _i < ARRAY_LEN(_rec->_name); _i++) { \
if (_rec->_name[_i] != (unsigned)~0) { \
for (unsigned long _j = 0; _j < ARRAY_LEN(_tbl); _j++) { \