[segyio] 228/376: Paranoid int-overflow assert.

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 622cecb439b2d6bd29d99c5a79c0557411b21419
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Tue Mar 7 09:24:47 2017 +0100

    Paranoid int-overflow assert.
---
 lib/src/segy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/src/segy.c b/lib/src/segy.c
index 07c0eec..d6b13c3 100644
--- a/lib/src/segy.c
+++ b/lib/src/segy.c
@@ -729,6 +729,8 @@ int segy_traces( segy_file* fp,
     if( size % trace_bsize != 0 )
         return SEGY_TRACE_SIZE_MISMATCH;
 
+    assert( size / trace_bsize <= (long long)INT_MAX );
+
     *traces = size / trace_bsize;
     return SEGY_OK;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list