fofi/FoFiType1.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 31734dcb365e2b69d88c86ddaee3bd62af97fade Author: Albert Astals Cid <[email protected]> Date: Fri Feb 26 00:19:58 2021 +0100 strtok -> strtok_r Otherwise we have threading issues if two threads are doing strtok at the same time Fixes issue #1050 diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc index 5a6b11b4..25d38452 100644 --- a/fofi/FoFiType1.cc +++ b/fofi/FoFiType1.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005, 2008, 2010, 2018 Albert Astals Cid <[email protected]> +// Copyright (C) 2005, 2008, 2010, 2018, 2021 Albert Astals Cid <[email protected]> // Copyright (C) 2005 Kristian Høgsberg <[email protected]> // Copyright (C) 2010 Jakub Wilk <[email protected]> // Copyright (C) 2014 Carlos Garcia Campos <[email protected]> @@ -335,7 +335,7 @@ void FoFiType1::parse() if ((p2 = strchr(p, ']'))) { *p2 = '\0'; for (j = 0; j < 6; ++j) { - if ((p = strtok(j == 0 ? p : nullptr, " \t\n\r"))) { + if ((p = strtok_r(j == 0 ? p : nullptr, " \t\n\r", &tokptr))) { fontMatrix[j] = atof(p); } else { break; _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
