[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] calling setlocale with wrong value
Hi List,
I use FreeBSD 4.6 and IC 4.8.5. If I use the getpwuid function in
genconfig.html, I get a segmentations fault. After many big helps from
Stefan Hornburg and my Brother Alexander, we have found the cause, why I
get a segmentations fault. In Config.pm, there is a codes
(POSIX::setlocale(POSIX::LC_ALL, $settings)
and $settings contains the file ..UI/locales/da_DK.cfg as a string,
which is wrong. This allocate a part of memmory, which is using by
getpwuid and getpwuid get a bad adress status. It seems to me, the right
variable name should be $name instead of $settings. With
diff -u Config.pm.orig Config.pm
--- Config.pm.orig Thu Jan 24 07:44:28 2002
+++ Config.pm Thu Aug 1 16:53:17 2002
@@ -1707,7 +1707,7 @@
and $eval = 1;
$eval and ! $safe and $safe = new Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
- if(POSIX::setlocale(POSIX::LC_ALL, $settings) ) {
+ if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
}
it works fine without a segmentations fault.
Any comments?
Thanks!
Joachim
--
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de