/pidgin/main: 71533f0d5dc0: win32: switch to OBS, update and pus...

Daniel Atallah datallah at pidgin.im
Sun Apr 7 18:57:40 EDT 2013


On Sun, Apr 7, 2013 at 4:22 PM, Tomasz Wasilczyk
<tomkiewicz at cpw.pidgin.im> wrote:
> Changeset: 71533f0d5dc06a5a5ecfc7dee1713a83e184534b
> Author:  Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
> Date:    2013-04-07 22:22 +0200
> Branch:  default
> URL: https://hg.pidgin.im/pidgin/main/rev/71533f0d5dc0
>
> Description:
>
> win32: switch to OBS, update and push to runtime-deps package - libenchant, gtkspell, meanwhile, tcl

<SNIP>

> diff --git a/libpurple/plugins/tcl/tcl.c b/libpurple/plugins/tcl/tcl.c
> --- a/libpurple/plugins/tcl/tcl.c
> +++ b/libpurple/plugins/tcl/tcl.c
> @@ -433,61 +433,21 @@ LPFNTKINIT wtk_Init = NULL;
>  #define Tk_Init wtk_Init
>
>  static gboolean tcl_win32_init() {
> -       const char regkey[] = "SOFTWARE\\ActiveState\\ActiveTcl\\";
> -       char *version = NULL;
>         gboolean retval = FALSE;
>
> -       if ((version = wpurple_read_reg_string(HKEY_LOCAL_MACHINE, regkey, "CurrentVersion"))
> -                       || (version = wpurple_read_reg_string(HKEY_CURRENT_USER, regkey, "CurrentVersion"))) {
> -               char *path = NULL;
> -               char *regkey2;
> -               char **tokens;
> -               int major = 0, minor = 0, micro = 0;
> -
> -               tokens = g_strsplit(version, ".", 0);
> -               if (tokens[0] && tokens[1] && tokens[2]) {
> -                       major = atoi(tokens[0]);
> -                       minor = atoi(tokens[1]);
> -                       micro = atoi(tokens[2]);
> +       if(!(wtcl_CreateInterp = (LPFNTCLCREATEINTERP) wpurple_find_and_loadproc("tcl85.dll", "Tcl_CreateInterp"))) {
> +               purple_debug(PURPLE_DEBUG_INFO, "tcl", "tcl_win32_init error loading Tcl_CreateInterp\n");

Why was the ActiveTcl handling removed?

Will these changes cause the Tcl plugin to now depend on a different Tcl flavor?

<SNIP>

> --- a/pidgin/win32/nsis/generate_gtk_zip.sh
> +++ b/pidgin/win32/nsis/generate_gtk_zip.sh

<SNIP>

> +TCL="${DOWNLOAD_HOST}mingw32-tcl-8.5.9-13.6.noarch.rpm Tcl 8.5.9-13.6 sha1sum:442eaf5e761d59bb527cb1f9f93749ebc13b4367"
> +TK="${DOWNLOAD_HOST}mingw32-tk-8.5.9-8.6.noarch.rpm Tk 8.5.9-8.6 sha1sum:d0884c56f767f76981ddf7bc6d74d3c47237740a"

Are these binary-compatible with versions that people are likely to
have (i.e ActiveTcl is the only one that I'm aware of)?

> diff --git a/pidgin/win32/wspell.c b/pidgin/win32/wspell.c
> --- a/pidgin/win32/wspell.c
> +++ b/pidgin/win32/wspell.c
> @@ -87,20 +87,19 @@ static void load_gtkspell() {
>         g_free(tmp);
>         g_setenv("PATH", tmp2, TRUE);
>         g_free(tmp2);
> +       g_free(tmp);

This looks like a double free.

>
> -       tmp = g_build_filename(wpurple_install_dir(), "spellcheck", GTKSPELL_DLL, NULL);
>         /* Suppress error popups */
> -       wpidginspell_new_attach_proxy = (void*) wpurple_find_and_loadproc(tmp, "gtkspell_new_attach" );
> +       wpidginspell_new_attach_proxy = (void*) wpurple_find_and_loadproc(GTKSPELL_DLL, "gtkspell_new_attach" );

The full path for this and various other dynamically loaded things is
intentional and necessary to protect against a particular class of
attacks.
The same applies to the Tcl initialization above.

-D




More information about the Devel mailing list