OpenSDE Packages Database (without history before r20070)
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.

55 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch
  5. # Copyright (C) 2016 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 39ea71fb8afddda879a1999f2a203dfdaf57a639 Mon Sep 17 00:00:00 2001
  17. From: Szabolcs Nagy <nsz@port70.net>
  18. Date: Mon, 29 Feb 2016 15:04:46 +0000
  19. Subject: [PATCH] fix * at the start of a BRE subexpression
  20. commit 7eaa76fc2e7993582989d3838b1ac32dd8abac09 made * invalid at
  21. the start of a BRE subexpression, but it should be accepted as
  22. literal * there according to the standard.
  23. This patch does not fix subexpressions starting with ^*.
  24. ---
  25. src/regex/regcomp.c | 4 ----
  26. 1 file changed, 4 deletions(-)
  27. diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
  28. index da6abd1..7a2864c 100644
  29. --- a/src/regex/regcomp.c
  30. +++ b/src/regex/regcomp.c
  31. @@ -889,7 +889,6 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s)
  32. s++;
  33. break;
  34. case '*':
  35. - return REG_BADPAT;
  36. case '{':
  37. case '+':
  38. case '?':
  39. @@ -978,9 +977,6 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx)
  40. }
  41. parse_iter:
  42. - /* extension: repetitions are rejected after an empty node
  43. - eg. (+), |*, {2}, but assertions are not treated as empty
  44. - so ^* or $? are accepted currently. */
  45. for (;;) {
  46. int min, max;
  47. --
  48. 2.7.2