[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
segfault in hostnames_matching
From: |
Grisha Levit |
Subject: |
segfault in hostnames_matching |
Date: |
Mon, 27 Mar 2023 12:49:14 -0400 |
another size_t issue
diff --git a/bashline.c b/bashline.c
index 0047caef..9df26d2e 100644
--- a/bashline.c
+++ b/bashline.c
@@ -919,7 +919,7 @@ hostnames_matching (const char *text)
continue;
/* OK, it matches. Add it to the list. */
- if (nmatch >= (rsize - 1))
+ if ((nmatch + 1) >= rsize)
{
rsize = (rsize + 16) - (rsize % 16);
result = strvec_resize (result, rsize);
- segfault in hostnames_matching,
Grisha Levit <=