aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-05-05 17:46:07 +0200
committerRickard Green <[email protected]>2014-05-22 17:11:14 +0200
commitf19fe9b2ada7824973660b41da0873825c5781ca (patch)
tree323ec3f1f754cfa47e870c7cfce8dc669225b853 /erts
parenta6c681cf14810a007a2bd4ad0066b4403460bffc (diff)
downloadotp-f19fe9b2ada7824973660b41da0873825c5781ca.tar.gz
otp-f19fe9b2ada7824973660b41da0873825c5781ca.tar.bz2
otp-f19fe9b2ada7824973660b41da0873825c5781ca.zip
Fix conversion of empty string in erts_convert_native_to_filename()
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_unicode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index 3a968594f3..f8e1431a53 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -2126,6 +2126,8 @@ Eterm erts_convert_native_to_filename(Process *p, byte *bytes)
mac = 1;
case ERL_FILENAME_UTF8:
size = strlen((char *) bytes);
+ if (size == 0)
+ return NIL;
if (erts_analyze_utf8(bytes,size,&err_pos,&num_chars,NULL) != ERTS_UTF8_OK) {
goto noconvert;
}