Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#187 Possible null pointer access in OLEObject

v3.1
closed
Mark Miesfeld
Classes (182)
5
2012-08-14
2006-09-22
Mark Miesfeld
No

This is in v3.1, but exists in all prior versions.

When .OLEObject~new is called with the optional
second parameter (either "WITHEVENTS" or "NOEVENTS")
the code to search for and activate event handling
assumes that pTypeInfo is valid.

This is not true, it is entirely possible that
pTypeInfo is null.

This does no harm unless the OLE Object supports the
IConnectionPointContainer interface, in which case
ooRexx crashes. I ran into this twice yesterday, so
it is probably not that rare of a case.

The attached patch fixes this.

Note that the current implementation of .OLEObject
will only support events if the OLE Object being
proxied supplies a Type Library. There is no real
reason for ooRexx to be this restrictive, so I am
going to open a feature request to change the design.

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2006-09-22

    Logged In: YES
    user_id=191588

    Accidently assigned this to orexx, which is not what I
    intended.

     


Anonymous


Cancel   Add attachments