You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.7 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../hotplug++/hotfixes.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Some hotfixes to prevent some segfaults.
- Rene Rebe <rene@exactcode.de>
Index: string
===================================================================
--- ./embeddedSTL/include/string (revision 70)
+++ ./embeddedSTL/include/string (working copy)
@@ -88,6 +88,10 @@
}
basic_string& assign(const char* cstr) {
+ if (!cstr) {
+ clear();
+ return *this;
+ }
size_type cstr_len = strlen(cstr);
reserve (cstr_len);
memcpy(m_str, cstr, cstr_len);
Index: bin/usb-match.cc
===================================================================
--- ./bin/usb-match.cc (revision 150)
+++ ./bin/usb-match.cc (working copy)
@@ -98,6 +98,8 @@
std::string interface = getenv ("INTERFACE"); // INTERFACE=%d/%d/%d
std::cout << product << " " << interface << " " << type << std::endl;
+ if (product.empty () || type.empty() || interface.empty())
+ return;
/* when we have a stringstream and real << >> operator implementations
in the embeddedSTL we can do this in nicer C++ style ... */