Skip to content

Possible memory leakage in function Emitter::emit #7

@rikkaii

Description

@rikkaii

Hi, I'm conducting a research on Rust security and found a bug in this crate:
The raw pointer emit is not freed after use, and utils::to_str function also does not take ownership of this pointer, which may cause a memory leak.

let emit = unsafe { ucl_object_emit(obj.as_ref().obj, Into::into(*self)) };
utils::to_str(emit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions