Skip to content

Commit

Permalink
fix(android): Fixed too small buffer while reading temporary file
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusvn committed Nov 13, 2023
1 parent 0da946d commit a5142f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,9 @@ private void processResultFromGallery(int destType, Intent intent) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();

int nRead;
byte[] data = new byte[512];
final int MB = 1048576;

byte[] data = new byte[MB * 4];

while ((nRead = fileStream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
Expand Down

0 comments on commit a5142f1

Please sign in to comment.