Sat, 27 May 2017 22:31:50 -0300
purple_email_is_valid: fix out of bounds read
Reported by Hanno Böck.
| libpurple/util.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/util.c Thu Mar 01 20:38:21 2018 -0600 +++ b/libpurple/util.c Sat May 27 22:31:50 2017 -0300 @@ -4403,7 +4403,7 @@ if (*c == '\"' && (c == address || *(c - 1) == '.' || *(c - 1) == '\"')) { while (*++c) { if (*c == '\\') { - if (*c++ && *c < 127 && *c != '\n' && *c != '\r') continue; + if (*c++ && *c < 127 && *c > 0 && *c != '\n' && *c != '\r') continue; else return FALSE; } if (*c == '\"') break;