mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 03:51:47 -08:00
Ensured that ecl_file_len() doesn't return a random value on error.
This partially addresses CID 66411 (Unchecked return value from library). The call to fstat() should still probably have error checking added.
This commit is contained in:
parent
8e714e3a55
commit
e13c07bd4a
1 changed files with 1 additions and 0 deletions
|
|
@ -454,6 +454,7 @@ cl_object
|
|||
ecl_file_len(int f)
|
||||
{
|
||||
struct stat filestatus;
|
||||
memset(&filestatus, 0, sizeof(filestatus));
|
||||
ecl_disable_interrupts();
|
||||
fstat(f, &filestatus);
|
||||
ecl_enable_interrupts();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue