[Libreoffice-commits] core.git: 2 commits - scripting/java xmerge/source
Noel Grandin
noel at peralex.com
Thu Oct 15 00:36:29 PDT 2015
scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java | 4 +++-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 396da96d27077ffb0ce670dc28ed24c3f7427e06
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 15 09:31:28 2015 +0200
cid#1326117 Unchecked return value
Change-Id: Ieaa1875a8731b5339d4ebf032b3f724ff889903f
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java
index bbd892a..3518feb 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java
@@ -107,7 +107,10 @@ public final class PdbDecoder {
// last record
dis.reset();
int len = dis.available() - recOffset[lastIndex];
- dis.skip(recOffset[lastIndex]);
+ int nBytesToSkip = recOffset[lastIndex];
+ while (nBytesToSkip > 0) {
+ nBytesToSkip -= dis.skip(nBytesToSkip);
+ }
byte[] bytes = new byte[len];
dis.readFully(bytes);
recArray[lastIndex] = new Record(bytes, recAttrs[lastIndex]);
commit 06907141b9f47df4c179be4c0d06b62fecf74528
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 15 09:29:29 2015 +0200
cid#1326116 Unchecked return value
Change-Id: If33ea9c4e4388cc1b7d15847f32dd2228b047363
diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
index a6c5d69..8320b62 100644
--- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
+++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
@@ -75,7 +75,9 @@ public class XInputStreamImpl implements XInputStream {
com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException {
try {
- is.skip(nBytesToSkip);
+ do {
+ nBytesToSkip -= is.skip(nBytesToSkip);
+ } while (nBytesToSkip > 0);
} catch (IOException e) {
throw new com.sun.star.io.IOException(e);
}
More information about the Libreoffice-commits
mailing list