Changeset 17de0e2 in git


Ignore:
Timestamp:
14/09/11 02:36:01 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
e60254e
Parents:
33c24dc
Message:

src/mainfrm.cc: Fix potential reading off end of string - fix from
Stuart Bennett.

git-svn-id: file:///home/survex-svn/survex/trunk@3627 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r33c24dc r17de0e2  
     1Wed Sep 14 01:35:20 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * src/mainfrm.cc: Fix potential reading off end of string - fix from
     4          Stuart Bennett.
     5
    16Wed Sep 14 00:33:16 GMT 2011  Olly Betts <olly@survex.com>
    27
  • src/mainfrm.cc

    r33c24dc r17de0e2  
    14501450                // Note that we require a match of a whole number of parts
    14511451                // between dots!
    1452                 for (size_t i = 0; prefix[i] == current_prefix[i]; ++i) {
     1452                size_t n = min(prefix.length(), current_prefix.length());
     1453                size_t i;
     1454                for (i = 0; i < n && prefix[i] == current_prefix[i]; ++i) {
    14531455                    if (prefix[i] == separator) count = i + 1;
    14541456                }
Note: See TracChangeset for help on using the changeset viewer.