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.

48 lines
1.7 KiB

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