From 3119f6e757ec0c0b43a312954a5a3c09b27bbaf3 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 13 Sep 2016 10:26:01 +0200 Subject: Fixed a possile buffer overrun when MAX_SKILL_LEVEL is changed Signed-off-by: Haru --- src/map/skill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 561154bdf..5e32e922c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -18995,7 +18995,7 @@ void skill_config_set_level(struct config_setting_t *conf, int *arr) if (config_setting_is_group(conf)) { for (i=0; isetting_lookup_int(conf, level, &arr[i]); } @@ -19259,7 +19259,7 @@ void skill_validate_element(struct config_setting_t *conf, struct s_skill_db *sk if ((t=libconfig->setting_get_member(conf, "Element")) && config_setting_is_group(t)) { int j = 0; - char lv[5]; + char lv[6]; // enough to contain "Lv100" in case of custom MAX_SKILL_LEVEL for (j=0; j < MAX_SKILL_LEVEL; j++) { sprintf(lv, "Lv%d",j+1); -- cgit v1.2.3-70-g09d2