gaim/gaim

a patch from Eric Timme
gtk1-stable
2002-12-05, Sean Egan
63bbc9ce1dc0
Parents 00a3f86702ba
Children 0dfb2267f93e
a patch from Eric Timme
  • +2 -0
    ChangeLog
  • +21 -13
    src/gaimrc.c
  • --- a/ChangeLog Sat Nov 23 13:50:47 2002 -0500
    +++ b/ChangeLog Thu Dec 05 15:37:55 2002 -0500
    @@ -2,6 +2,8 @@
    version 0.59.7
    * Yahoo i18n fix (Thanks Ethan Blanton).
    + * Fixed a bug in escaping saved passwords (Thanks
    + Eric Timme)
    version 0.59.6 (11/07/2002):
    * Fixed a segfault introduced in 0.59.5 when gtk
    --- a/src/gaimrc.c Sat Nov 23 13:50:47 2002 -0500
    +++ b/src/gaimrc.c Thu Dec 05 15:37:55 2002 -0500
    @@ -74,14 +74,13 @@
    p->value[x][0] = 0;
    }
    -
    while (*c) {
    if (*c == '\t') {
    c++;
    continue;
    }
    +
    if (inopt) {
    - /* if ((*c < 'a' || *c > 'z') && *c != '_') { */
    if ((*c < 'a' || *c > 'z') && *c != '_' && (*c < 'A' || *c > 'Z')) {
    inopt = 0;
    p->option[optlen] = 0;
    @@ -94,29 +93,38 @@
    c++;
    continue;
    } else if (inval) {
    - if ((*c == '}')) {
    - if (*(c - 1) == '\\') {
    - p->value[curval][vallen - 1] = *c;
    - c++;
    - continue;
    - } else {
    - p->value[curval][vallen - 1] = 0;
    - inval = 0;
    - c++;
    - continue;
    - }
    + if (*c == '\\') {
    + /* if we have a \ take the char after it literally.. */
    + c++;
    + p->value[curval][vallen] = *c;
    +
    + vallen++;
    + c++;
    + continue;
    + } else if (*c == '}') {
    + /* } that isn't escaped should end this chunk of data, and
    + * should have a space before it.. */
    + p->value[curval][vallen - 1] = 0;
    + inval = 0;
    + c++;
    + continue;
    } else {
    p->value[curval][vallen] = *c;
    +
    vallen++;
    c++;
    continue;
    }
    } else if (*c == '{') {
    + /* i really don't think this if ever succeeds, but i'm
    + * not brave enough to take it out... */
    if (*(c - 1) == '\\') {
    p->value[curval][vallen - 1] = *c;
    c++;
    continue;
    } else {
    + /* { that isn't escaped should signify the start of a
    + * piece of data and should have a space after it.. */
    curval++;
    vallen = 0;
    inval = 1;