diff options
author | David S. Miller <davem@davemloft.net> | 2016-05-04 00:52:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-04 00:52:29 -0400 |
commit | cba653210056cf47cc1969f831f05ddfb99ee2bd (patch) | |
tree | 92d93a3eee5b12d77af3696b9da8026e71df5752 /fs/udf/unicode.c | |
parent | 26879da58711aa604a1b866cbeedd7e0f78f90ad (diff) | |
parent | 7391daf2ffc780679d6ab3fad1db2619e5dd2c2a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv4/ip_gre.c
Minor conflicts between tunnel bug fixes in net and
ipv6 tunnel cleanups in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/udf/unicode.c')
-rw-r--r-- | fs/udf/unicode.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index 3ff42f4437f3..695389a4fc23 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c | |||
@@ -335,9 +335,21 @@ try_again: | |||
335 | return u_len; | 335 | return u_len; |
336 | } | 336 | } |
337 | 337 | ||
338 | int udf_CS0toUTF8(uint8_t *utf_o, int o_len, const uint8_t *ocu_i, int i_len) | 338 | int udf_dstrCS0toUTF8(uint8_t *utf_o, int o_len, |
339 | const uint8_t *ocu_i, int i_len) | ||
339 | { | 340 | { |
340 | return udf_name_from_CS0(utf_o, o_len, ocu_i, i_len, | 341 | int s_len = 0; |
342 | |||
343 | if (i_len > 0) { | ||
344 | s_len = ocu_i[i_len - 1]; | ||
345 | if (s_len >= i_len) { | ||
346 | pr_err("incorrect dstring lengths (%d/%d)\n", | ||
347 | s_len, i_len); | ||
348 | return -EINVAL; | ||
349 | } | ||
350 | } | ||
351 | |||
352 | return udf_name_from_CS0(utf_o, o_len, ocu_i, s_len, | ||
341 | udf_uni2char_utf8, 0); | 353 | udf_uni2char_utf8, 0); |
342 | } | 354 | } |
343 | 355 | ||