sal/rtl/alloc_arena.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8dbe4f2aebff1bd763e4f44c8f9e2a367316da4b
Author: Stephan Bergmann <[email protected]>
Date:   Fri Oct 31 15:23:12 2014 +0100

    cid#1202756 Clarify with assert that ave == 0 cannot happen
    
    ...so (highbit(ave) - 1) will never be negative and never cause undefined 
shift by negative
    value.
    
    Change-Id: I86703f03d30d48c74d2e814c182b9edb85d18186

diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 1ed1497..c49f147 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -392,6 +392,7 @@ rtl_arena_hash_remove (
                 if (!(arena->m_flags & RTL_ARENA_FLAG_RESCALE))
                 {
                     sal_Size ave = nseg >> arena->m_hash_shift;
+                    assert(ave != 0);
                     sal_Size new_size = arena->m_hash_size << (highbit(ave) - 
1);
 
                     arena->m_flags |= RTL_ARENA_FLAG_RESCALE;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to