Commit 490e018
authored
api/glfs: Fix use after free in readdir (#4477)
There is a code path in glfs readdir where we might end up
using a free'ed memory. A possible case is when we use the
fd to read the offset 0 after reading the content at least
once, and the during the second time, the readdir return 0,
probably due to the contents got deleted.
Change-Id: I08fa6cc9b924b90597ef4498e081cae9339fbd6a
Fixes: #3955
Signed-off-by: Mohammed Rafi KC <[email protected]>1 parent 909a01f commit 490e018
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
4014 | 4015 | | |
4015 | 4016 | | |
4016 | 4017 | | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
4017 | 4023 | | |
4018 | 4024 | | |
4019 | 4025 | | |
| |||
0 commit comments