mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
progs/slang: Check for ftell failure in vstest.c.
This commit is contained in:
parent
d36cb2396c
commit
c88b18a4df
1 changed files with 6 additions and 0 deletions
|
|
@ -220,6 +220,12 @@ static void load_test_file (const char *filename)
|
|||
|
||||
fseek (f, 0, SEEK_END);
|
||||
size = ftell (f);
|
||||
|
||||
if (size == -1) {
|
||||
fclose (f);
|
||||
return;
|
||||
}
|
||||
|
||||
fseek (f, 0, SEEK_SET);
|
||||
|
||||
code = (char *) (malloc (size));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue