commit: 7b239af630a92184d7e7e024904b3c66ff08c381
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 19:47:21 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 19:47:21 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7b239af6
qlop: fix Coverity 125912 Out-of-bounds access
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
qlop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qlop.c b/qlop.c
index 8c166e2..cbe3b58 100644
--- a/qlop.c
+++ b/qlop.c
@@ -138,7 +138,7 @@ parse_date(const char *sdate, time_t *t)
/* Handle the formats:
* <#> <day|week|month|year>[s] [ago]
*/
- len = strlen(sdate);
+ len = strlen(sdate) + 1;
unsigned long num;
char dur[len];