[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-233-gcbb93fa

Richard B. Kreckel git at ginac.de
Sat Oct 9 18:41:18 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GiNaC -- a C++ library for symbolic computations".

The branch, master has been updated
       via  cbb93fadabbd56ba006902967b15b2b2aebb037c (commit)
      from  e99d0d58c1bbaa8ee73e4a90a90aa1086f2f813d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cbb93fadabbd56ba006902967b15b2b2aebb037c
Author: Alexei Sheplyakov <alexei.sheplyakov at gmail.com>
Date:   Sat Oct 9 18:39:41 2010 +0200

    mul: algebraic_subs_mul(), has(): don't write beyond the end of array
    
    algebraic_match_mul_with_mul() iterates over operands of mul, that is
    
    for (size_t i=0; i<e.nops(); ++i)
    
    However, the size of arrays (`vectors' in STL speak) passed to this
    function is seq.size(), which is nops() - 1 for any mul object. Thus
    algebraic_match_mul_with_mul() accesses beyond the arrays limit. Usually
    it's not a problem, since any reasonable implementation of std::vector<bool>
    packs booleans into ints (or longs). However, some STL implementations
    (in particular, the one shipped with msvc) are more picky, and access
    beyond the vector<bool> limits results in a segfault. Therefore let's
    play safe and allocate proper number of elements (that is, nops()) for
    those arrays (subsed and currsubsed).

-----------------------------------------------------------------------

Summary of changes:
 ginac/mul.cpp |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)


hooks/post-receive
--
GiNaC -- a C++ library for symbolic computations


More information about the GiNaC-devel mailing list