** Changed in: zorba
       Status: In Progress => Fix Committed

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  vector subscript out of range assertion hit on windows

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  in src/zorbatypes/binary.cpp a lot of vectors are accessed with [0],

        copy_without_ws( aString, aLength, &aBase64.theData[0] )

  if in this case aLength is of size 0 the assertion "vector subscript
  out of range" is hit on windows in debug build. This happens because
  size == pos in std::vector implementation on windows:

    reference operator[](size_type _Pos)
                {       // subscript mutable sequence
                if (size() <= _Pos)
                        {       // report error
                        _DEBUG_ERROR("vector subscript out of range");

  Therefore, before accessing a vector with [0] one must check whether
  the size of the vector is > 0. Otherwise the mentioned assertion will

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to