commit | d5562c72cd29cbec75f9b6e054b2bbbfccf7e5fd | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Nov 08 11:30:50 2022 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Nov 08 11:30:50 2022 +0100 |
tree | a432568b10c95d69c83405d01b30de4f54b98c6f | |
parent | 9d7f2e24a1cca50e206709a91d5dffd53b777135 [diff] |
parser common UPDATE explicit limited strcpy
diff --git a/src/parser_common.c b/src/parser_common.c index 54910b2..072a4e7 100644 --- a/src/parser_common.c +++ b/src/parser_common.c
@@ -1669,7 +1669,7 @@ /* store date */ LY_CHECK_RET(lysp_check_date(ctx, stmt->arg, strlen(stmt->arg), "revision")); - strcpy(rev->date, stmt->arg); + strncpy(rev->date, stmt->arg, LY_REV_SIZE - 1); /* parse substatements */ for (const struct lysp_stmt *child = stmt->child; child; child = child->next) {