Changes between Initial Version and Version 1 of Ticket #3403, comment 34


Ignore:
Timestamp:
Dec 8, 2016, 1:39:53 PM (7 years ago)
Author:
Vladislav Belov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3403, comment 34

    initial v1  
    11Replying to [comment:33 leper]:
    22> ... [ r19027 ] contains implicit casts in code that does memory accesses, which is something that is very commonly seen in code that is vulnerable to OOB reads and writes. By now I'm quite certain that this piece of code only fails in a way that doesn't leak any data, just yield some unexpected results if the C++ data would be changed from the C++ side, or via another path not yet there. I did however need 4 reads of that code to come to that assertion, for pieces of code that should be a lot shorter (about 1 line for reading and 1 for writing). Using To/FromJSVal might even work out of the box, otherwise extending them slightly would be a lot shorter than those blocks of code (and would not duplicate something we already do in a common place). The code also seems to copy around vectors for fun.
    3 I know about `leftBottom = rightTop = m_Series[0].m_Points[0];`, but it needs to shortest check that all series are empty, i.e. `std::find_if`, but I'm not sure yet.
     3I know about `leftBottom = rightTop = m_Series[0].m_Points[0];`, but it needs a shortest check that all series are empty, i.e. `std::find_if`, but I'm not sure yet.
    44
    55Do you mean to use `To/FromJSVal` for `GUIST_CGUISeries, GUIST_CGUIList, etc` insead of the current way? But it seems it won't be really shorter.