Commit 46a29e11 authored by Javier Guerra Melgares's avatar Javier Guerra Melgares

Merge branch 'maintenance/v2.10.0' of...

Merge branch 'maintenance/v2.10.0' of https://gitlab.iotivity.org/otgc/otgc-android into maintenance/v2.10.0
parents bc71c073 2b12bfe8
......@@ -168,8 +168,10 @@ public class IORepository {
byte[] fileBytes;
try (InputStream inputStream =
mContext.getAssets().open(path)) {
fileBytes = new byte[inputStream.available()];
int numBytes = inputStream.available() + 1;
fileBytes = new byte[numBytes];
inputStream.read(fileBytes);
fileBytes[numBytes - 1] = '\0';
}
return fileBytes;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment