From: SourceForge.net <no...@so...> - 2004-11-25 01:11:40
|
Patches item #1072279, was opened at 2004-11-24 00:10 Message generated for change (Settings changed) made by lschiere You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1072279&group_id=235 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Evan Schoenberg (evands) >Assigned to: Stu Tomlinson (nosnilmot) Summary: [MSN] Crash fix: syn_cmd in notification.c Initial Comment: It appears from relatively common crash traces such as: <Crashed> 0 libSystem.B.dylib 0x9000c148 strtol + 0x28 1 Libgaim 0x053f6a44 syn_cmd + 0x24 2 Libgaim 0x0540286c msn_cmdproc_process_cmd + 0x158 3 Libgaim 0x053fa79c read_cb + 0x200 that cmd->params[2] can be NULL in notification.c's syn_cmd. Previously, there was no safety check and the call was via atoi(), which is deprecated. According to the implementation notes in its man page: The atoi() function has been deprecated by strtol() and should not be used in new code. Accordingly, while adding a safety check, the call also now goes through strtol(), which is used elsewhere in gaim as well. The MSN prpl, specifically notification.c, does use atoi() in many places; a further patch could convert all these calls to strtol() calls. It should be noted that atoi(), on my system at least, is clearly calling strtol()... as the man page states: DESCRIPTION The atoi() function converts the initial portion of the string pointed to by nptr to int representation. It is equivalent to: (int)strtol(nptr, (char **)NULL, 10); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1072279&group_id=235 |