[Libreoffice-commits] core.git: extensions/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 4 21:04:00 UTC 2018


 extensions/source/scanner/sane.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7992e3f73e169175067fe31e9a89900161ed4e9a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Nov 4 15:59:19 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Nov 4 22:03:03 2018 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 )
                     )


More information about the Libreoffice-commits mailing list