Hello,
We use coverity in our project and it shows few issues in the file - RNFSManager.java
Resource Leak - In the method - public void read(String filepath, int length, int position, Promise promise), inputstream is not closed and hence it leaks -
Resource Leak - In the method - public void readFile(String filepath, Promise promise), inputStream variable is not closed and hence it leaks when it goes out of scope
Resource Leak - In the method - public void hash(String filepath, String algorithm, Promise promise), inputStream variable is not closed and hence it leaks when it goes out of scope.
Filesystem path, filename, or URI manipulation (A user-controllable string is used as part or all of a filesystem path, filename, or URI (uniform resource identifier)) - In the method - public void stat(String filepath, Promise promise) -
String originalFilepath = getOriginalFilepath(filepath, true);originalFilePath is resultant from RNFSManager.java, where it is result of cursor which may be errorprone.
Hello, We use coverity in our project and it shows few issues in the file - RNFSManager.java
String originalFilepath = getOriginalFilepath(filepath, true);
originalFilePath
is resultant from RNFSManager.java, where it is result of cursor which may be errorprone.Request to triage. Thanks