Skip to content

Insecure Temporary File #21

@ihsinme

Description

@ihsinme

https://github.com/huangz1990/annotated_redis_source/blob/67758fdfe196d96ddc8a83784fa48f22226a3818/deps/lua/src/loslib.c#L60

https://github.com/huangz1990/redis-3.0-annotated/blob/8e60a75884e75503fb8be1a322406f21fb455f67/deps/lua/src/loslib.c#L60

Good afternoon.
I noticed in your code the functions using tmpnam. the problem with this function is that it only determines the availability of the filename at the time it is called.
those. when you start working with this name, you are not sure about the absence of a file with this name.
if it is important then you need to use mkstemp or mkdtemp.

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