-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Looking here:
cpp11/inst/include/cpp11/as.hpp
Lines 109 to 115 in cf7391b
| if (Rf_isString(from)) { | |
| if (Rf_xlength(from) == 1) { | |
| const char* c_p = nullptr; | |
| unwind_protect([&] { c_p = Rf_translateCharUTF8(STRING_ELT(from, 0)); }); | |
| return c_p[0]; | |
| } | |
| } |
If an error occurs during translation, c_p will remain as a nullptr and then the attempt to access the zero-th element will likely crash.
Metadata
Metadata
Assignees
Labels
No labels