From 0bfd5394bc1ed6ef9e887071dc14391923e69ebf Mon Sep 17 00:00:00 2001 From: Robin Watts <Robin.Watts@artifex.com> Date: Tue, 25 Sep 2018 07:23:07 -0400 Subject: [PATCH] Bug 699809: Avoid overrunning non terminated string buffer. Don't call strlen on something that doesn't have a terminator. Use the stored length instead. --- base/gsicc_manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/gsicc_manage.c b/base/gsicc_manage.c index ff685e7..eccd820 100644 --- a/base/gsicc_manage.c +++ b/base/gsicc_manage.c @@ -3010,7 +3010,7 @@ gs_currentsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval) pval->persistent = true; } else { pval->data = (byte *)pgs->icc_manager->srcgtag_profile->name; - pval->size = strlen((const char *)pval->data); + pval->size = pgs->icc_manager->srcgtag_profile->name_length; pval->persistent = false; } } -- 2.9.1