Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

A kind of potential NullPointerException bugs in method tokenizeToStringArray #468

Open
JulyChen728 opened this issue Nov 12, 2019 · 1 comment

Comments

@JulyChen728
Copy link

Hi all,

Our tool has found one kind of potential NPE bugs caused by returning null in method tokenizeToStringArray.

There are several points that use the null value, including:

  1. assigned to variable pathParts in method extractPathWithinPattern and used it by pathParts.length in method extractPathWithinPattern

  2. assigned to variable patternParts in method extractPathWithinPattern and used it by pathParts.length in method extractPathWithinPattern

  3. the null value is returned by method tokenizePath. There are still several points that use this null value, including:
    3.1. assigned to variable pathDirs in method doMatch and used it by pathDirs.length - 1 in method doMatch
    3.2. assigned to variable tokenized in method tokenizePattern and assigned to variable pattDirs by String[] pattDirs = tokenizePattern(pattern); in method doMatch. Finally, it is used by pattDirs.length - 1;

Thanks.

@ITWOI
Copy link

ITWOI commented Nov 21, 2019

Hi, we have reported the bugs a while ago would you please take a look and confirm if they are real bugs. We have been conducting an experiment to measure the accuracy of our static checker. We would be deeply appreciated if you can provide some feedback!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants