Dag Nygren writes:
>
> Hi,
>
> I have been using xmysqladmin successfully for quite
> some time to change the table structure of my databases
> (as I haven't been able to fugure out how to do this with
> mysqlgui...)
>
> After doing lots of upgrades here, Linux -> 2.4.3, glibc -> 2.2
> and mysql -> 3.23.31 xmysqladmin started coredumping.
> No problem I did those changes from mysql, but now as I had
> some bigger changes and seom more time I checked out what
> was wrong and here are the results:
>
> The problem is that there are functions in util.c that returns
> a pointer to a function private string. This will be allocated on the
> stack and destroyed randomly. Using it then will end up in disaster.
> It apparently worked with previous glibc:s by chance.....
>
> The fix is to make the variables 'static'.
>
> The following patch will do that:
>
> --- utils.c.orig Wed Apr 25 11:11:29 2001
> +++ utils.c Wed Apr 25 11:05:04 2001
> @@ -612,7 +612,7 @@
> char *deb, *der;
> int cur = 0;
> char *copie;
> - char reponse[256];
> + static char reponse[256]; /* Outside refers !! ([EMAIL PROTECTED])
> 24.4.2001 */
>
> copie = (char *) malloc(strlen(string) + 1);
>
> @@ -666,7 +666,7 @@
> char *deb, *der, *max;
> int cur = 0;
> int lg;
> - char reponse[256];
> + static char reponse[256]; /* Outside refers !! ([EMAIL PROTECTED])
> 24.4.2001 */
> char *copie;
>
> lg = strlen(string);
>
> BRGDS
>
>
> --
> Dag Nygren email: [EMAIL PROTECTED]
> Oy NewTech Ab phone: +358 9 8024910
> Trasktorpet 3 fax: +358 9 8024916
> 02360 ESBO GSM: 0400-426312
> FINLAND
Sorry, but we do not have utils.c in our source tree.
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php