[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH] lib/vfscore: stat() - Return EINVAL if pathname is NULL


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Wed, 21 Aug 2019 16:50:13 +0300
  • Cc: felipe.huici@xxxxxxxxx, charalampos.mainas@xxxxxxxxx
  • Delivery-date: Wed, 21 Aug 2019 13:50:22 +0000
  • Ironport-phdr: 9a23:h1gbURzhU4XggpnXCy+O+j09IxM/srCxBDY+r6Qd2+ISIJqq85mqBkHD//Il1AaPAdyBrasY0KGI4ujJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVmjaxe65+IRq4oAnet8QbhZZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8JwkqxVvRyvqR94zYPPfI2ZKOBzcr/HcN8GWWZMWNtaWSxbAoO7aosCF/QMPeFDr4nhplsOqwa1Cw+xBOP31z9Dm3j70rE90+Q6DQHG3QogE8gKsHTJtNX1KbwfXvyuzKXS1TXDcuhZ1S3n6IjPax0sp+yHU7FoccfJ1EUiGB7Jgk+TpIHlJT+ZyPoBvmqB4+duTe6jlmEqpxxrrjWsxsogkJfFi4wbx1ze6Cl0z5g5KNulQ0Bhe9GkCoFftySCOotzRcMtXn9ntT4hyr0DpZ67ZC8KyIk7xxLHa/yIbYyI4hX7WeaPJDd3nnNleLalixmu6kis0PX8VtSv31pQtCpFlcHAtnEL1xPN9siKUuZx80i81TqV1A3e6vtILV4qmafZMZIszKY8lp8JvkTCGi/2ll/2jKiTdkg85ueo7P/nYqnnpp+aLYN0jhz+MrwzmsGkHes4KRICX3CG+eunzrHj50r5TK1QjvIqiqnZrIzaJcMDq668Ag9V1Icj6xGkDzu/zdsXg2cHI0xBeB+ci4jpOkrOIOzjDfuljFWjjjFry+rBPr37DZXHNmLDn6v5fbZh905czxI+wsxf551OELEOOvbzVVX0tNzACR85KBa4w+P9B9V80IMRQ3mPD7SfMKzMrVCI4vggLPKWaIALpTb3M+Il6OL2jX8lhV8derGk3ZUJZ3C8H/RmO1uWbWDsgtccEGcFogs+QffsiFKcTTFTY2y9ULkm6j4lFYL1RbvEE4Wshr2Gx2K3E4NbYkhCC0uQCjH4eoPCXO0DOwyIJco0uTsfSbmnA6s8zQzm4AT90KZmKKzQ5zUFnZn4ksBo7avJkkdhpnRPE82B3jTVHClPlWQSSmpu0Q==
  • Ironport-sdr: VJSxIXSeU+ymI32KBvdrw74FqLzt1WiKndn/UkC8AY3r7WjmzH04IeY/dheQMvkIcxFQNYQP3T ap35YajxBFUQ==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 lib/vfscore/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index fff233f3..f8692322 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1141,6 +1141,8 @@ LFS64(__xstat);
 
 int stat(const char *pathname, struct stat *st)
 {
+       if (!pathname)
+               return EINVAL;
        return __xstat(1, pathname, st);
 }
 
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.