Mercurial > pidgin.yaz
diff libfaim/aim_login.c @ 715:58106806ac2b
[gaim-migrate @ 725]
yay
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 18 Aug 2000 00:21:53 +0000 |
parents | 6d78b988b479 |
children | 58a6e6e26695 |
line wrap: on
line diff
--- a/libfaim/aim_login.c Thu Aug 17 23:23:24 2000 +0000 +++ b/libfaim/aim_login.c Fri Aug 18 00:21:53 2000 +0000 @@ -253,9 +253,9 @@ * No matter what, we should have a screen name. */ sn = aim_gettlv_str(tlvlist, 0x0001, 1); - memcpy(sess->logininfo.screen_name, sn, strlen(sn)); - sn[(strlen(sn))] = '\0'; - + strncpy(sess->logininfo.screen_name, sn, strlen(sn)); + free(sn); + /* * Check for an error code. If so, we should also * have an error url. @@ -311,10 +311,18 @@ aim_freetlvchain(&tlvlist); - /* These have been clobbered by the freetlvchain */ - sess->logininfo.BOSIP = NULL; - sess->logininfo.email = NULL; - sess->logininfo.errorurl = NULL; + if (sess->logininfo.BOSIP) { + free(sess->logininfo.BOSIP); + sess->logininfo.BOSIP = NULL; + } + if (sess->logininfo.email) { + free(sess->logininfo.email); + sess->logininfo.email = NULL; + } + if (sess->logininfo.errorurl) { + free(sess->logininfo.errorurl); + sess->logininfo.errorurl = NULL; + } return ret; }