Skip to content

Commit

Permalink
imera: protect against NPE in FsSqlDriver#read
Browse files Browse the repository at this point in the history
    RB: https://rb.dcache.org/r/7385/
    Acked-by: Paul Millar
    Target: trunk
    Request: 2.11 2.10 2.9 2.8 2.7 2.6
(cherry picked from commit f125236)
  • Loading branch information
DmitryLitvintsev committed Nov 21, 2014
1 parent 28c82df commit 4af8b23
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -1370,7 +1370,9 @@ int read(Connection dbConnection, FsInode inode, int level, long beginIndex, byt

if (rs.next()) {
InputStream in = rs.getBinaryStream(1);

if (in == null) {
return count;
}
in.skip(beginIndex);
int c;
while (((c = in.read()) != -1) && (count < len)) {
Expand Down

0 comments on commit 4af8b23

Please sign in to comment.