You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
919 B

  1. From c5eb6cf3aba0af048596106ed839b4ae17ecbcb1 Mon Sep 17 00:00:00 2001
  2. From: Nick Wellnhofer <wellnhofer@aevum.de>
  3. Date: Sat, 27 Apr 2019 11:19:48 +0200
  4. Subject: [PATCH] Fix uninitialized read of xsl:number token
  5. Found by OSS-Fuzz.
  6. ---
  7. libxslt/numbers.c | 5 ++++-
  8. 1 file changed, 4 insertions(+), 1 deletion(-)
  9. diff --git a/libxslt/numbers.c b/libxslt/numbers.c
  10. index 89e1f668..75c31eba 100644
  11. --- a/libxslt/numbers.c
  12. +++ b/libxslt/numbers.c
  13. @@ -382,7 +382,10 @@ xsltNumberFormatTokenize(const xmlChar *format,
  14. tokens->tokens[tokens->nTokens].token = val - 1;
  15. ix += len;
  16. val = xmlStringCurrentChar(NULL, format+ix, &len);
  17. - }
  18. + } else {
  19. + tokens->tokens[tokens->nTokens].token = (xmlChar)'0';
  20. + tokens->tokens[tokens->nTokens].width = 1;
  21. + }
  22. } else if ( (val == (xmlChar)'A') ||
  23. (val == (xmlChar)'a') ||
  24. (val == (xmlChar)'I') ||
  25. --
  26. 2.21.0