Skip to content

Potential NULL Pointer Dereference #1190

@7erryX

Description

@7erryX

In Commit 119ef50, encode_preR13_section in src/encode.c was added a pointer check before dereference _obj->name to prevent null pointer dereference.

However, json_tables_write in src/out_json.c contains a similar logic flaw

                if (strEQc (_obj->name, "*MODEL_SPACE"))
                  {
                    LOG_TRACE ("Skip *MODEL_SPACE\n");
                    continue;
                  }

Would it make sense to fix it in the same way as 119ef50 did by adding a null pointer check?

Thank you for spending time reading this issue, apologies if I missed anything.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions