Skip to content

[BUG] Unchecked strdup return value in matroska.c #2159

@Anayo-Anyafulu

Description

@Anayo-Anyafulu

Summary

In parse_segment_track_entry() in src/lib_ccx/matroska.c, strdup("eng") on line 866 is called without checking for NULL. If allocation fails, lang will be NULL and could cause issues if dereferenced before reassignment.

Code

Line 866: char *lang = strdup("eng");

Suggested Fix

Add a NULL check and call fatal(EXIT_NOT_ENOUGH_MEMORY, ...) if strdup returns NULL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions