From: mid Date: Mon, 3 Jan 2000 01:38:35 +0000 (+0000) Subject: Another printf and a bugfix in offgoing_middle. X-Git-Tag: rel_0_99_2~174 X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/commitdiff_plain/1a7c221447604b61a608fb48c85d34d52d114ac5 Another printf and a bugfix in offgoing_middle. --- diff --git a/aim_info.c b/aim_info.c index 92e1f78..42b7bdf 100644 --- a/aim_info.c +++ b/aim_info.c @@ -43,6 +43,7 @@ u_long aim_getinfo(struct aim_session_t *sess, struct aim_snac_t snac; snac.id = sess->snac_nextid; + printf("faim: getuserinfo: caching snac %08lx\n", snac.id); snac.family = 0x0002; snac.type = 0x0005; snac.flags = 0x0000; @@ -289,8 +290,8 @@ int aim_parse_offgoing_middle(struct aim_session_t *sess, u_int i = 0; rxcallback_t userfunc=NULL; - /* Protect against future SN length extensions */ - strncpy(sn, command->data+11, (((int)(command->data+10))<=MAXSNLEN)?(int)command->data+10:MAXSNLEN); + strncpy(sn, command->data+11, (int)command->data[10]); + sn[(int)command->data[10]] = '\0'; userfunc = aim_callhandler(command->conn, AIM_CB_FAM_BUD, AIM_CB_BUD_OFFGOING); if (userfunc)