Mercurial > pidgin.yaz
diff src/server.c @ 79:bfdc427b936d
[gaim-migrate @ 89]
I'll save time and just post the email :-)
Summary of changes:
* Misc malloc/free cleanups, use g_malloc more places and
other small stuff (e.g. lineardata not being freed in the
error case in sound.c)
* Misc signed/unsigned cleanups (use size_t more often)
* read() can return -1 at any point, check return values
more rigorously (read_rv variables used for this)
* In can_play_audio, stat requires a pointer to an
allocated stat_buf (the address of an automatic variable)
* escape_text needs a buffer at least 4 times the size of
the text being passed in (not 2 times); I can force core
dumps with lots of newlines otherwise
* There's a debug statement in netscape_command
(browser.c) that was printf("Hello%d\n"); with no int for
the %d; I threw in a getppid(), but the statement should
probably come out eventually.
Thanks, G Sumner Hayes!
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 05 Apr 2000 05:34:08 +0000 |
parents | 939455223459 |
children | 9f6ce50ffb78 |
line wrap: on
line diff
--- a/src/server.c Fri Mar 31 20:22:12 2000 +0000 +++ b/src/server.c Wed Apr 05 05:34:08 2000 +0000 @@ -108,7 +108,7 @@ char *buf; if (strlen(current_user->user_info)) { - buf = g_malloc(strlen(current_user->user_info) * 2); + buf = g_malloc(strlen(current_user->user_info) * 4); strcpy(buf, current_user->user_info); escape_text(buf); serv_set_info(buf); @@ -170,7 +170,7 @@ char *city, char *state, char *country, int web) { #ifndef USE_OSCAR - char buf2[BUF_LEN], buf[BUF_LEN]; + char buf2[BUF_LEN*4], buf[BUF_LEN]; g_snprintf(buf2, sizeof(buf2), "%s:%s:%s:%s:%s:%s:%s:%s", first, middle, last, maiden, city, state, country, (web == 1) ? "Y" : ""); @@ -577,10 +577,8 @@ else g_snprintf(who, 63, CONVERSATION_TITLE, name); gtk_window_set_title(GTK_WINDOW(cv->window), who); - /* no free 'who', set_title needs it. - */ - /* Umm .. Why?? */ - g_free(who); + /* was g_free(buf), but break gives us that + * and freeing twice is not good --Sumner */ break; } cnv = cnv->next;