libpurple/util.c

branch
release-2.x.y
changeset 38922
9f05d7f41a53
parent 38737
d85c241e3183
child 38929
159404505264
child 39933
e3c4fde8a94a
equal deleted inserted replaced
38906:cda0ef7d24fb 38922:9f05d7f41a53
4401 /* first we validate the name portion (name@domain) (rfc822)*/ 4401 /* first we validate the name portion (name@domain) (rfc822)*/
4402 for (c = address; *c; c++) { 4402 for (c = address; *c; c++) {
4403 if (*c == '\"' && (c == address || *(c - 1) == '.' || *(c - 1) == '\"')) { 4403 if (*c == '\"' && (c == address || *(c - 1) == '.' || *(c - 1) == '\"')) {
4404 while (*++c) { 4404 while (*++c) {
4405 if (*c == '\\') { 4405 if (*c == '\\') {
4406 if (*c++ && *c < 127 && *c != '\n' && *c != '\r') continue; 4406 if (*c++ && *c < 127 && *c > 0 && *c != '\n' && *c != '\r') continue;
4407 else return FALSE; 4407 else return FALSE;
4408 } 4408 }
4409 if (*c == '\"') break; 4409 if (*c == '\"') break;
4410 if (*c < ' ' || *c >= 127) return FALSE; 4410 if (*c < ' ' || *c >= 127) return FALSE;
4411 } 4411 }

mercurial