From 2178c7445a3464bd69637ad91a2dd0320a60e0df Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 3 Aug 2019 18:19:11 -0700 Subject: Use bounds checking string functions everywhere Replace strcpy, strcat, sprintf with strlcpy, strlcat, snprintf everywhere, even where there were already bounds checks in place, to reduce time spent checking static analysis results. Signed-off-by: Alan Coopersmith --- src/bitmap/bitscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bitmap') diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c index 00adcc6..5f77635 100644 --- a/src/bitmap/bitscale.c +++ b/src/bitmap/bitscale.c @@ -1596,7 +1596,7 @@ BitmapOpenScalable (FontPathElementPtr fpe, /* Prepare font properties for the new font */ - strcpy (fontName, scaleFrom->name.name); + strlcpy (fontName, scaleFrom->name.name, sizeof(fontName)); FontParseXLFDName (fontName, vals, FONT_XLFD_REPLACE_VALUE); propCount = ComputeScaledProperties(&sourceFont->info, fontName, vals, -- cgit v1.2.3