lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] udf: Fix to check the return value of load_nls
Date
load_nls may fail and return an error message. The patch checks
for such a scenario and passes the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
fs/udf/super.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index ffd8038ff728..1a38271de6d9 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -573,6 +573,8 @@ static int udf_parse_options(char *options, struct udf_options *uopt,
if (uopt->nls_map)
unload_nls(uopt->nls_map);
uopt->nls_map = load_nls(args[0].from);
+ if (!uopt->nls_map)
+ return 0;
uopt->flags |= (1 << UDF_FLAG_NLS_MAP);
}
break;
--
2.17.1
\
 
 \ /
  Last update: 2019-03-19 04:00    [W:0.033 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site