Age | Commit message (Collapse) | Author | Lines |
|
Check malloc return value for NULL.
|
|
Fixed memory leak on file name collision.
|
|
If malloc cannot allocate enough memory, it could return NULL. This is
not necessarily true for default Linux settings, but can be provoked
there as well by adjusting proc entries. Other systems like the *BSD
ones definitely do this.
The function _emalloc exists for exactly this purpose, so use it instead
of calling malloc directly.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
If feh_unique_filename encounters a file that already exists, the memory
for the temporary filename is not released. As this happens in /tmp at
some code places, an attacker could use this to spray the memory of feh,
or simply triggering an out of memory condition.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
If ereadfile encounters an empty file or the file could not be read, an
out ouf boundary read (and possible write) occurs. Always check the
return value of fread to be > 0 before processing the result buffer.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
|
|
|
|
|
|
|
|
|
|
|