Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH79 (on top of PR#78 fixes) #80

Closed
wants to merge 10 commits into from
Closed

Conversation

rurban
Copy link

@rurban rurban commented Jun 20, 2022

fix ranges with ending -

Fixes GH #79 and the exreg failures with [1-5-]+[-1-2]-[-]

Reinhard Urban added 10 commits June 10, 2022 13:42
add another formal verifier (much easier to use),
and fix an invalid signed conversion
with invalid types in re_print
seperate functions.
check assume vs nondet_uchar() (both are the same).
use less MAX_REGEXP_OBJECTS for cbmc (much faster then)

improve the no buffer-out-of-bounds access on invalid patterns check.
and use the enum type internally
and fix isalpha crashes on bad libc's. Fixes GH kokke#70.
e.g. UTF-8.
Fixes GH kokke#79 and the exreg failures with [1-5-]+[-1-2]-[-]
@rurban rurban changed the title Fix GH79 (on top of PR fixes) Fix GH79 (on top of PR#78 fixes) Jun 20, 2022
This was referenced Jun 20, 2022
@torstenvl
Copy link

Please merge, this fixes a large number of failing tests.

static int matchcharclass(char c, const char* str)
{
  do
  {
    if (matchrange(c, str))
    {
      return 1;
    }
    else if (str[0] == '\\')
    {
      /* Escape-char: increment str-ptr and match on next char */
      str += 1;
      if (matchmetachar(c, str))
      {
        return 1;
      }
      else if ((c == str[0]) && !ismetachar(c))
      {
        return 1;
      }
    }
    else if (c == str[0])
    {
      if (c == '-')
      {
        if ((str[-1] == '\0') || (str[1] == '\0')) return 1; else continue;
      }
      else
      {
        return 1;
      }
    }
  }
  while (*str++ != '\0');

  return 0;
}

@rurban rurban closed this Jun 6, 2023
@rurban rurban deleted the fix-gh79 branch June 6, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants