OpenTimelineIO / OpenTimelineIO-C-Bindings

C bindings for the OpenTimelineIO Library (http://opentimeline.io)
http://opentimeline.io
Apache License 2.0
10 stars 7 forks source link

Add NULL checks as needed #5

Open meshula opened 3 years ago

meshula commented 3 years ago

Add NULL checks as needed. c.f. https://github.com/PixarAnimationStudios/OpenTimelineIO/commit/9fbf870807ebd9bc9ecfe8781c998cfe1e50d64f

KarthikRIyer commented 3 years ago

The NULL checks in the commit are for parameters that are either optional or have default values in the C++ API. The check for this have been added.

Is there anything else to do in this issue?

meshula commented 3 years ago

To clarify the issue, this commit - PixarAnimationStudios/OpenTimelineIO@9fbf870 - shows an example of preventing crashes from null dereferencing by checking parameters and handling them in some manner. That particular one I fixed already because I encountered it in practice, and so made a fix. This issue is about doing an audit of all the code, which is a huge task. It might make sense to make a list of source files in this issue, with check boxes, like this

and just work through them little by little as we have time.

KarthikRIyer commented 3 years ago

👍

meshula commented 3 years ago

Path: copentime

Path: copentimelineio

rogergodspeed commented 1 week ago

Is this only an issue where you are reinterpret_cast'ing? If so only errorStatus.cpp and rationalTime.cpp use that in copentime. The issue might not be so widespread elsewhere either.