rem: *ptr = 0;
add: str_copyb(&username, start, ptr-start); if (local_name && memchr(start, '@', ptr-start) == 0) { str_copyb(&linebuf, data, ptr-data); str_catc(&linebuf, '@'); str_catc(&username, '@'); str_cats(&linebuf, local_name); str_cats(&username, local_name); str_catb(&linebuf, ptr, size-(ptr-data)); data = linebuf.s; size = linebuf.len; }
context: static void filter_client_data(char* data, ssize_t size){  char* cmd;  char* ptr;  cmd = parse_label(data, size);  if(cmd) {    /* If we see a "AUTH" or "LOGIN" command, save the preceding label     * for reference when looking for the corresponding "OK" */    if(!strncasecmp(cmd, "AUTHENTICATE ", 5)) {      str_copy(&saved_label, &label);      str_truncate(&label, 0);      saw_auth = 1;    }    else if(!strncasecmp(cmd, "LOGIN ", 6)) {      ptr = cmd + 6;      while (isspace(*ptr))	++ptr;      str_copys(&username, ptr);      ptr = username.s;      while (!isspace(*ptr))	++ptr;      *ptr = 0;      str_copy(&saved_label, &label);      str_truncate(&label, 0);    }  }  else if(saw_auth) {    ptr = base64decode(data, size);    if (ptr) {      str_copys(&username, ptr);      ptr = username.s;      while (!isspace(*ptr)) ++ptr;      *ptr = 0;    }    saw_auth = 0;  }  write_server(data, size);}