[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH v3] lib/vfscore: stat() - Return EINVAL if pathname is NULL
- To: minios-devel@xxxxxxxxxxxxx
- From: Costin Lupu <costin.lupu@xxxxxxxxx>
- Date: Thu, 22 Aug 2019 13:16:23 +0300
- Cc: sharan.santhanam@xxxxxxxxx
- Delivery-date: Thu, 22 Aug 2019 10:16:29 +0000
- Ironport-phdr: 9a23:bUa3OxOIQys+G07OHGEl6mtUPXoX/o7sNwtQ0KIMzox0Iv77rarrMEGX3/hxlliBBdydt6sezbOK7uu6BSQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagf79+Ngi6oArRu8UZn4dvJbs6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyoBKjU38nzYitZogaxbvhyvuhJxzY3TboyOKPZyYrnQcc8ASGZdQspcUTFKDIOmb4sICuoMJfhVr47mp1sSrBu+AxSnCuXyyj9Qm3/9wKo33PgmEQHdwAwgHtQOvG7QrNXoLKcSTPu4w7XTzTnZd/NWxCzy5JLSchAmuPyBW697f8nJyUQ3Cg/IgUicpZbmMj6VzOgBrXaX4uh6We+hk2Irtg58riW1ysovioTFnJwZx17K+Clj3Yo4KsO0RUhmatC+CpRQrTuVN45uT8MnRGFnpTg1x6UduZ6+YCgK0JMnxwPDa/Cfc4iH/BbjVOGJLDdmgXJqYrO/hxKo/Ue80e3wTNG00EtRoSZfiNnMsWgB1x3V6seZVvtw5lqt1DmS2wzJ6exJIVo4mbTFJ5Mj2LI9mIIfsUHZES/3nEX2grWWdkIh+uWw9+vnZa7mpoOdN49ykA3+NrkumtSiAekjLgcORHKX+fyh1LL450H5WrJKguUskqbFqJDaOdgbpqmhDg9Q04Yj7Re/DzC90NgBgHYIMkxFdwyDj4XyP1HOIev4Deukg1i2nzZk2fbGMqfmApXXIXjJiK3hcqpl605A1AozyshS54lUCr4bOvL8QEnxuMbDDhAjNQy03+bnB8971owEXGKCGamZP73Ovl+M/O0gOPOAa5EIuGW1F/9w4v/ojHgi3FMQY6St9Z8Wc2yjWORrJQOee3W/rM0GFDIhuREiTeqirECaTHYHbHGpQ6M6oDUmEJ+OBpyFXp2nxqaGinToVqZKb3xLXwjfWUzjcJ+JDq8B
- Ironport-sdr: b39A+UlVt9IZ5frop+FoCcmtbTaevwJ2TwybsEKJqI8zBMWhjjZkJa8YejhLGQYc7laJO3vvhN ZugTuixB0D5A==
- List-id: Mini-os development list <minios-devel.lists.xenproject.org>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
lib/vfscore/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index fff233f3..be055b78 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1141,6 +1141,10 @@ LFS64(__xstat);
int stat(const char *pathname, struct stat *st)
{
+ if (!pathname) {
+ errno = EINVAL;
+ return -1;
+ }
return __xstat(1, pathname, st);
}
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|