Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29891

a suggestion of implementation of stop_word.c

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.11.0
    • N/A
    • None
    • ubuntu20.04

    Description

      Hi, I found a fragile code in implementation of stop_word.c that may occur null pointer dereference, and I have shown the execution sequence of the program that may generate the bug on the figure below. The red text illustrates the steps that generate the bug, the file path can be seen in the blue framed section.

      if a guard is here to provide this case, just like line 97-line 99 in above figure, i think it good for robustness of project
      Although the code shown is for version 10.3 but is still exist in current version

      would you can help to check if this?thank you for your effort and patience!

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            The mroonga upstream doesn't appear to have any of these references in their repository.

            Our update seems to be waiting on MDEV-20544.

            Do you have a SQL/data that can trigger this? I could just be overly cautious code in some areas that can't be reached.

            danblack Daniel Black added a comment - The mroonga upstream doesn't appear to have any of these references in their repository. Our update seems to be waiting on MDEV-20544 . Do you have a SQL/data that can trigger this? I could just be overly cautious code in some areas that can't be reached.
            ash1852 ash1852 added a comment -

            Currently there is no data to trigger this, this code snippet is identified as fragile by our analysis tool, so I'm just making a suggestion as it doesn't seem like much work, just need add a guard, like code in line 98.

            ash1852 ash1852 added a comment - Currently there is no data to trigger this, this code snippet is identified as fragile by our analysis tool, so I'm just making a suggestion as it doesn't seem like much work, just need add a guard, like code in line 98.
            kou Kouhei Sutou added a comment -

            Thanks for the suggestion!
            But current_token is never NULL. So this is safe.

            kou Kouhei Sutou added a comment - Thanks for the suggestion! But current_token is never NULL . So this is safe.

            People

              kou Kouhei Sutou
              ash1852 ash1852
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.