[gparted] Prevent crash when using an unknown locale (#692049)



commit 75eba94a6c1620675c01c78119ea9878d6a06856
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Jan 20 01:04:59 2013 +0000

    Prevent crash when using an unknown locale (#692049)
    
    When GParted is run with a locale the OS doesn't know it crashes.
    Reapply original fix.
    
        # LANG=xx_XX.UTF-8 ~mike/bin/gpartedbin
    
        (process:20385): Gtk-WARNING **: Locale not supported by C library.
                Using the fallback 'C' locale.
        ======================
        libparted : 3.1
        ======================
    
        (gpartedbin:20385): glibmm-ERROR **:
        unhandled exception (type std::exception) in signal handler:
        what: locale::facet::_S_create_c_locale name not valid
    
        Trace/breakpoint trap (core dumped)
    
    Original bug:
        Bug #157871 - gparted 0.0.6 segfaults on start
    First fix:
        commit a98126d69b176a35ca30bbdb469e84478d76f08d
        quick 'fix' for crashers in some locales (#157871) basicly the same +
    Accidentally reintroduced by:
        commit a739afc9a1d1d94a8c95446db762db93cff15572
        Update String::ucompose library to version 1.0.5
    
    Bug #692049 - Troubles with some locales

 compose/ucompose.hpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/compose/ucompose.hpp b/compose/ucompose.hpp
index e5f1cfc..5a84b26 100644
--- a/compose/ucompose.hpp
+++ b/compose/ucompose.hpp
@@ -186,7 +186,8 @@ namespace UStringPrivate
     : arg_no(1)
   {
 #if __GNUC__ >= 3
-    os.imbue(std::locale("")); // use the user's locale for the stream
+    //Prevent crash with unknown locales.  See bugs #157871, #692049
+    //os.imbue(std::locale("")); // use the user's locale for the stream
 #endif
     std::string::size_type b = 0, i = 0;
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]