r35 - unstable/rutilt/debian/patches
benh at alioth.debian.org
benh at alioth.debian.org
Sun Oct 7 18:30:10 UTC 2007
Author: benh
Date: 2007-10-07 18:30:10 +0000 (Sun, 07 Oct 2007)
New Revision: 35
Added:
unstable/rutilt/debian/patches/004_fix_ctype_usage.diff
unstable/rutilt/debian/patches/005_fix_extraction_checks.diff
unstable/rutilt/debian/patches/006_fix_temporary_c_str.diff
unstable/rutilt/debian/patches/007_fix_buffer_lengths.diff
unstable/rutilt/debian/patches/008_fix_row_toggled.diff
unstable/rutilt/debian/patches/009_remove_unsafe_signal_handler.diff
Modified:
unstable/rutilt/debian/patches/series
Log:
Added some bug fixes.
Added: unstable/rutilt/debian/patches/004_fix_ctype_usage.diff
===================================================================
--- unstable/rutilt/debian/patches/004_fix_ctype_usage.diff (rev 0)
+++ unstable/rutilt/debian/patches/004_fix_ctype_usage.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,51 @@
+--- rutilt.orig/lib/src/Parameters.cxx
++++ rutilt/lib/src/Parameters.cxx
+@@ -223,7 +223,7 @@
+ for (std::string::size_type i (Key.size()) ; i-- ; )
+ if (Key [i] == '-' || Key [i] == ':' || Key [i] == ' ')
+ Key.erase (i, 1);
+- else if (!isxdigit (Key [i]))
++ else if (!isxdigit (static_cast<unsigned char> (Key[i])))
+ {
+ #ifndef NDEBUG
+ std::cerr << "Bad format, key : #" << Key << "# byte " << i
+@@ -232,7 +232,7 @@
+ throw CBadFormatExc();
+ }
+ else
+- Key [i] = toupper (Key [i]);
++ Key [i] = toupper (static_cast<unsigned char> (Key[i]));
+ if (Key.empty())
+ {
+ #ifndef NDEBUG
+--- rutilt.orig/lib/src/WWidgets.cxx
++++ rutilt/lib/src/WWidgets.cxx
+@@ -68,7 +68,7 @@
+ CKeyEntry* This) throw()
+ {
+ if (!::gtk_toggle_button_get_active (This->m_pIsASCIIButton) &&
+- !std::isxdigit (*NewText))
++ !std::isxdigit (static_cast<unsigned char> (*NewText)))
+ ::g_signal_stop_emission_by_name (pEditable, "insert-text");
+
+ } // NewTextTyped()
+@@ -80,7 +80,7 @@
+ if (!::gtk_toggle_button_get_active (This->m_pIsASCIIButton))
+ for (const char* KeyStr (::gtk_entry_get_text (This->m_pEntry)) ;
+ *KeyStr ; ++KeyStr)
+- if (!std::isxdigit (*KeyStr))
++ if (!std::isxdigit (static_cast<unsigned char> (*KeyStr)))
+ {
+ This->Clear();
+ break;
+--- rutilt.orig/lib/src/XMLParser.cxx
++++ rutilt/lib/src/XMLParser.cxx
+@@ -148,7 +148,7 @@
+ if (!Length) return;
+ unsigned i (0);
+ for ( ; i < Length ; ++i) // We ignore indentation and things like that.
+- if (!isspace (Text [i])) break;
++ if (!isspace (static_cast<unsigned char> (Text [i]))) break;
+ if (i == Length) return;
+
+ try{This->Text (::g_markup_parse_context_get_element (pContext),
Added: unstable/rutilt/debian/patches/005_fix_extraction_checks.diff
===================================================================
--- unstable/rutilt/debian/patches/005_fix_extraction_checks.diff (rev 0)
+++ unstable/rutilt/debian/patches/005_fix_extraction_checks.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,52 @@
+--- rutilt.orig/lib/src/CWirelessMsgHandler.cxx
++++ rutilt/lib/src/CWirelessMsgHandler.cxx
+@@ -35,7 +35,7 @@
+ std::istringstream Is (Str);
+ T Value;
+ Is >> Value;
+- if (Is || Is.eof()) return Value;
++ if (Is) return Value;
+ throw nsErrors::CException ("Invalid data read (from helper).",
+ nsErrors::InvalidDataFromHelper);
+
+@@ -50,6 +50,9 @@
+ unsigned DefaultKey;
+ std::istringstream Is (Str);
+ Is >> Encrypt >> Auth >> DefaultKey;
++ if (!Is)
++ throw nsErrors::CException ("Invalid data read (from helper).",
++ nsErrors::InvalidDataFromHelper);
+ nsWireless::CEncryptionD Descriptor;
+ Descriptor.SetEncrypt (nsWireless::EncryptType_e (Encrypt));
+ Descriptor.SetAuth (nsWireless::AuthType_e (Auth));
+@@ -70,7 +73,7 @@
+ nsErrors::InvalidDataFromHelper);
+ }
+ }
+- if (!(Is || Is.eof()))
++ if (!Is)
+ throw nsErrors::CException ("Invalid data read (from helper).",
+ nsErrors::InvalidDataFromHelper);
+ return Descriptor;
+--- rutilt.orig/lib/src/PrefsPage.cxx
++++ rutilt/lib/src/PrefsPage.cxx
+@@ -246,7 +246,7 @@
+
+ int nsGUI::CPrefsPage::GetSelectedRate () const throw()
+ {
+- float Rate;
++ float Rate = 0.0;
+ std::istringstream Is (::gtk_combo_box_get_active_text (m_pRatesBox));
+ Is >> Rate;
+ return int (Rate * 1000);
+--- rutilt.orig/lib/src/RTWMsgHandlers.cxx
++++ rutilt/lib/src/RTWMsgHandlers.cxx
+@@ -35,7 +35,7 @@
+ std::istringstream Is (Str);
+ T Value;
+ Is >> Value;
+- if (Is || Is.eof()) return Value;
++ if (Is) return Value;
+ throw nsErrors::CException ("Invalid data read (from helper).",
+ nsErrors::InvalidDataFromHelper);
+
Added: unstable/rutilt/debian/patches/006_fix_temporary_c_str.diff
===================================================================
--- unstable/rutilt/debian/patches/006_fix_temporary_c_str.diff (rev 0)
+++ unstable/rutilt/debian/patches/006_fix_temporary_c_str.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,14 @@
+--- rutilt.orig/lib/src/NetTools.cxx
++++ rutilt/lib/src/NetTools.cxx
+@@ -129,8 +129,9 @@
+ {
+ if (nsSystem::Fork())
+ {
+- const char* Argv [5] = {(nsCore::DhcpScriptPrefix +
+- nsCore::DhcpScriptName).c_str(),
++ std::string ScriptName (nsCore::DhcpScriptPrefix +
++ nsCore::DhcpScriptName);
++ const char* Argv [5] = {ScriptName.c_str(),
+ m_IfName.c_str(), Data.c_str(), 0};
+ try {nsSystem::Exec (Argv);}
+ catch (const nsErrors::CException& Exc)
Added: unstable/rutilt/debian/patches/007_fix_buffer_lengths.diff
===================================================================
--- unstable/rutilt/debian/patches/007_fix_buffer_lengths.diff (rev 0)
+++ unstable/rutilt/debian/patches/007_fix_buffer_lengths.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,28 @@
+--- rutilt.orig/lib/src/RTDrivers.cxx
++++ rutilt/lib/src/RTDrivers.cxx
+@@ -1039,9 +1039,9 @@
+
+ void nsWireless::CRT73Driver::SetRfmontx (bool B) throw (nsErrors::CSystemExc)
+ {
+- char Buffer (B ? '1' : '0');
+- m_Data.data.pointer = reinterpret_cast< ::caddr_t> (&Buffer);
+- m_Data.data.length = 2;
++ char Buffer[2] = {B ? '1' : '0', 0};
++ m_Data.data.pointer = reinterpret_cast< ::caddr_t> (Buffer);
++ m_Data.data.length = sizeof (Buffer);
+ m_Data.data.flags = 0;
+ Ioctl (GetRfmontxIoctl(), "Can't set injection mode.");
+ SetFlag (Rfmontx, B);
+--- rutilt.orig/lib/src/SystemTools.cxx
++++ rutilt/lib/src/SystemTools.cxx
+@@ -120,9 +120,7 @@
+ std::memset(&addr, 0, sizeof (addr));
+ const size_t UNIX_PATH_MAX (108U);
+ addr.sun_family = AF_UNIX;
+- addr_name.copy (addr.sun_path + 1, UNIX_PATH_MAX - 2);
+- addr.sun_path [addr_name.size() > UNIX_PATH_MAX - 1 ? UNIX_PATH_MAX
+- : addr_name.size()] = '\0';
++ addr_name.copy (addr.sun_path + 1, UNIX_PATH_MAX - 1);
+
+ } // InitSockaddrUn()
+
Added: unstable/rutilt/debian/patches/008_fix_row_toggled.diff
===================================================================
--- unstable/rutilt/debian/patches/008_fix_row_toggled.diff (rev 0)
+++ unstable/rutilt/debian/patches/008_fix_row_toggled.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,19 @@
+--- rutilt.orig/lib/src/CSelectableRowList.cxx
++++ rutilt/lib/src/CSelectableRowList.cxx
+@@ -18,6 +18,7 @@
+ /** \file CSelectableRowList.cxx
+ \author Romain BONDUE
+ \date 28/07/2005 */
++#include <cstdlib> // atoi()
+ #include <cstring> // memset()
+
+ #include "CSelectableRowList.h"
+@@ -184,7 +185,7 @@
+ {
+ ::gtk_tree_selection_select_iter (::gtk_tree_view_get_selection
+ (This->m_pListView),
+- &This->m_IterVec [Path [0] - '0']);
++ &This->m_IterVec [atoi(Path)]);
+ This->RowTriggered();
+ }
+
Added: unstable/rutilt/debian/patches/009_remove_unsafe_signal_handler.diff
===================================================================
--- unstable/rutilt/debian/patches/009_remove_unsafe_signal_handler.diff (rev 0)
+++ unstable/rutilt/debian/patches/009_remove_unsafe_signal_handler.diff 2007-10-07 18:30:10 UTC (rev 35)
@@ -0,0 +1,12 @@
+--- rutilt.orig/lib/src/GtkGUI.cxx
++++ rutilt/lib/src/GtkGUI.cxx
+@@ -283,7 +283,9 @@
+ m_PrefsPage.AddTrayIconButtonCallBack
+ (G_CALLBACK (DisplayTrayIconButtonCallBack), this);
+
++#if 0
+ TrapSignals();
++#endif
+ LoadOptions();
+ SetWindowIcons();
+ #ifndef NDEBUG
Modified: unstable/rutilt/debian/patches/series
===================================================================
--- unstable/rutilt/debian/patches/series 2007-10-07 18:28:52 UTC (rev 34)
+++ unstable/rutilt/debian/patches/series 2007-10-07 18:30:10 UTC (rev 35)
@@ -1,3 +1,9 @@
+004_fix_ctype_usage.diff
+005_fix_extraction_checks.diff
+006_fix_temporary_c_str.diff
+007_fix_buffer_lengths.diff
+008_fix_row_toggled.diff
+009_remove_unsafe_signal_handler.diff
001_fix_desktop.diff
002_fix_install.diff
003_fix_ELF_location.diff
More information about the Pkg-ralink-commits
mailing list