Mercurial > pidgin
comparison libpurple/protocols/jabber/auth_digest_md5.c @ 31177:53096ba34fe6
jabber: Properly parse realm="" in DIGEST-MD5, which is apparently valid.
On a marginally related note, the ABNF in this RFC is really ugly.
Refs #a14514.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 02 Feb 2011 05:51:09 +0000 |
parents | e743507b3767 |
children |
comparison
equal
deleted
inserted
replaced
31176:e743507b3767 | 31177:53096ba34fe6 |
---|---|
76 || *val_start == '\r' || *val_start == '\n' | 76 || *val_start == '\r' || *val_start == '\n' |
77 || *val_start == '"')) | 77 || *val_start == '"')) |
78 val_start++; | 78 val_start++; |
79 | 79 |
80 val_end = cur; | 80 val_end = cur; |
81 while (val_end != val_start && (*val_end == ' ' || *val_end == ',' || *val_end == '\t' | 81 while (val_end >= val_start && (*val_end == ' ' || *val_end == ',' || *val_end == '\t' |
82 || *val_end == '\r' || *val_end == '\n' | 82 || *val_end == '\r' || *val_end == '\n' |
83 || *val_end == '"' || *val_end == '\0')) | 83 || *val_end == '"' || *val_end == '\0')) |
84 val_end--; | 84 val_end--; |
85 | 85 |
86 if (val_start != val_end) | 86 if (val_end - val_start + 1 >= 0) |
87 value = g_strndup(val_start, val_end - val_start + 1); | 87 value = g_strndup(val_start, val_end - val_start + 1); |
88 } | 88 } |
89 | 89 |
90 g_hash_table_replace(ret, name, value); | 90 g_hash_table_replace(ret, name, value); |
91 } | 91 } |