diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-04 15:59:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-04 22:03:03 +0100 |
commit | 7992e3f73e169175067fe31e9a89900161ed4e9a (patch) | |
tree | 560d969bf556fee1ae73f76661de9591226d4a8e /extensions/source | |
parent | 922f935f9ddefcfc50d0bbf805c97ea3f9d5c5e6 (diff) |
coverity#1440838 Unchecked return value from library
Change-Id: I200a7be1eefdd2764e79b31ba1950a7b3d97d0b4
Reviewed-on: https://gerrit.libreoffice.org/62850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/scanner/sane.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 481204f49d3b..a13930ceef3a 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -788,7 +788,11 @@ bool Sane::Start( BitmapTransporter& rBitmap ) for (nLine = nHeight-1; nLine >= 0; --nLine) { - fseek( pFrame, nLine * aParams.bytes_per_line, SEEK_SET ); + if (fseek(pFrame, nLine * aParams.bytes_per_line, SEEK_SET) == -1) + { + bSuccess = false; + break; + } if( eType == FrameStyle_BW || ( eType == FrameStyle_Gray && aParams.depth == 8 ) ) |