diff options
Diffstat (limited to 'src/de/blinkt/openvpn/FileSelect.java')
-rw-r--r-- | src/de/blinkt/openvpn/FileSelect.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/FileSelect.java b/src/de/blinkt/openvpn/FileSelect.java index 88a9abdd..8389a2ab 100644 --- a/src/de/blinkt/openvpn/FileSelect.java +++ b/src/de/blinkt/openvpn/FileSelect.java @@ -155,7 +155,8 @@ public class FileSelect extends Activity { InputStream input = new FileInputStream(file); long len= file.length(); - + if (len > VpnProfile.MAX_EMBED_FILE_SIZE) + throw new IOException("selected file size too big to embed into profile"); // Create the byte array to hold the data byte[] bytes = new byte[(int) len]; |