Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NULL checks as needed #5

Open
meshula opened this issue Feb 18, 2021 · 5 comments
Open

Add NULL checks as needed #5

meshula opened this issue Feb 18, 2021 · 5 comments

Comments

@meshula
Copy link
Member

meshula commented Feb 18, 2021

Add NULL checks as needed. c.f. AcademySoftwareFoundation/OpenTimelineIO@9fbf870

@KarthikRIyer
Copy link
Contributor

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
Copy link
Member Author

meshula commented May 14, 2021

To clarify the issue, this commit - AcademySoftwareFoundation/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

  • file1.cpp
  • file2.cpp

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

@KarthikRIyer
Copy link
Contributor

👍

@meshula
Copy link
Member Author

meshula commented May 14, 2021

Path: copentime

  • ▕─ errorStatus.cpp
  • ▕─ rationalTime.cpp
  • ▕─ timeRange.cpp
  • ▕─ timeTransform.cpp

Path: copentimelineio

  • ▕─ any.cpp
  • ▕─ anyDictionary.cpp
  • ▕─ anyVector.cpp
  • ▕─ clip.cpp
  • ▕─ composable.cpp
  • ▕─ composableRetainerVector.cpp
  • ▕─ composableVector.cpp
  • ▕─ composition.cpp
  • ▕─ deserialization.cpp
  • ▕─ effect.cpp
  • ▕─ effectRetainerVector.cpp
  • ▕─ effectVector.cpp
  • ▕─ errorStatus.cpp
  • ▕─ externalReference.cpp
  • ▕─ freezeFrame.cpp
  • ▕─ gap.cpp
  • ▕─ generatorReference.cpp
  • ▕─ item.cpp
  • ▕─ linearTimeWarp.cpp
  • ▕─ mapComposableTimeRange.cpp
  • ▕─ marker.cpp
  • ▕─ markerRetainerVector.cpp
  • ▕─ markerVector.cpp
  • ▕─ mediaReference.cpp
  • ▕─ missingReference.cpp
  • ▕─ optionalPairRationalTime.cpp
  • ▕─ retainerPairComposable.cpp
  • ▕─ safely_typed_any.cpp
  • ▕─ serializableCollection.cpp
  • ▕─ serializableObject.cpp
  • ▕─ serializableObjectRetainerVector.cpp
  • ▕─ serializableObjectVector.cpp
  • ▕─ serializableObjectWithMetadata.cpp
  • ▕─ serialization.cpp
  • ▕─ stack.cpp
  • ▕─ stackAlgorithm.cpp
  • ▕─ timeEffect.cpp
  • ▕─ timeline.cpp
  • ▕─ track.cpp
  • ▕─ trackAlgorithm.cpp
  • ▕─ trackVector.cpp
  • ▕─ transition.cpp
  • ▕─ typeRegistry.cpp
  • ▕─ unknownSchema.cpp

@rogergodspeed
Copy link
Contributor

rogergodspeed commented Sep 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants