libc/fdsan: add fdsan protection for all file pointers

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2023-05-18 18:21:45 +08:00 committed by Xiang Xiao
parent 97d2d6376d
commit d70d406161
1 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,12 @@ FAR FILE *fdopen(int fd, FAR const char *mode)
} }
} }
#ifdef CONFIG_FDSAN
android_fdsan_exchange_owner_tag(fd, 0,
android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_FILE,
(uintptr_t)filep));
#endif
return filep; return filep;
} }