git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '9e7330d793887fe9ee378ca1413141d7761e76ca'
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
FimfictionApi.java
diff --git
a/src/be/nikiroo/fanfix/supported/FimfictionApi.java
b/src/be/nikiroo/fanfix/supported/FimfictionApi.java
index 43d01d19494f616c6811e5757da4a6f2e14c83cc..e6dd6118721b93aec36c0d7c734faad1c6d9a95b 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/FimfictionApi.java
+++ b/
src/be/nikiroo/fanfix/supported/FimfictionApi.java
@@
-147,7
+147,13
@@
class FimfictionApi extends BasicSupport {
try {
InputStream in = Instance.getInstance().getCache().open(coverImageUrl, null, true);
try {
try {
InputStream in = Instance.getInstance().getCache().open(coverImageUrl, null, true);
try {
- meta.setCover(new Image(in));
+ Image img = new Image(in);
+ if (img.getSize() == 0) {
+ img.close();
+ throw new IOException(
+ "Empty image not accepted");
+ }
+ meta.setCover(img);
} finally {
in.close();
}
} finally {
in.close();
}