mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
There is a small race where a file can be replaced with a link between the call to mz_os_is_symlink and the call to mz_stream_os_open. Add MZ_OPEN_MODE_NOFOLLOW to make sure that (on POSIX) a link cannot be followed.
403 B
403 B
MZ_OPEN
Stream open flag enumeration.
| Name | Code | Description |
|---|---|---|
| MZ_OPEN_MODE_READ | 0x01 | Open for reading |
| MZ_OPEN_MODE_WRITE | 0x02 | Open for writing |
| MZ_OPEN_MODE_READWRITE | 0x03 | Open for reading and writing |
| MZ_OPEN_MODE_APPEND | 0x04 | Open for appending |
| MZ_OPEN_MODE_CREATE | 0x08 | Open for creating |
| MZ_OPEN_MODE_EXISTING | 0x10 | Open existing |
| MZ_OPEN_MODE_NOFOLLOW | 0x20 | Do not follow symlinks |