The code in the new 'edit' command in the shell uses the .data() member of <basic_string> (i.e. <string>) but then tests for NUL to end the string. The code should use .c_str() instead, which does NUL terminate. This is probably not a real-world error because real implementations of <string> seem to store strings NUL-terminated anyway.
#ifndef _WIN32
static void edit(const string& var){
static const char * editor = getenv("EDITOR");
if (!editor)
for (const char* p=var.data(); *p ; p++){ // should use c_str() instead of data()
if (! (isalnum(*p) || *p == '_' || *p == '.'))
}