OpenSDE Packages Database (without history before r20070)
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.

49 lines
1.7 KiB

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