FreeBSD Bugzilla – Attachment 213597 Details for
Bug 245690
x11-wm/herbstluftwm: Segfault on startx call after update to 0.8.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Official patch
herbstluftwm-fix-segfault.diff (text/plain), 1.75 KB, created by
Zsolt Udvari
on 2020-04-20 10:20:55 UTC
(
hide
)
Description:
Official patch
Filename:
MIME Type:
Creator:
Zsolt Udvari
Created:
2020-04-20 10:20:55 UTC
Size:
1.75 KB
patch
obsolete
>Index: files/patch-src_regexstr.cpp >=================================================================== >--- files/patch-src_regexstr.cpp (nonexistent) >+++ files/patch-src_regexstr.cpp (working copy) >@@ -0,0 +1,36 @@ >+--- src/regexstr.cpp.orig 2020-04-09 18:02:12 UTC >++++ src/regexstr.cpp >+@@ -11,10 +11,16 @@ RegexStr RegexStr::fromStr(const std::st >+ { >+ RegexStr r; >+ r.source_ = source; >+- try { >+- r.regex_ = std::regex(source, std::regex::extended); >+- } catch (const std::exception& e) { >+- throw std::invalid_argument(e.what()); >++ // An empty regex is not allowed in the POSIX grammar >++ // as one can infer from the grammar at >++ // https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_05_03 >++ // => So we must not compile "" to a regex >++ if (!source.empty()) { >++ try { >++ r.regex_ = std::regex(source, std::regex::extended); >++ } catch (const std::exception& e) { >++ throw std::invalid_argument(e.what()); >++ } >+ } >+ return r; >+ } >+@@ -26,7 +32,11 @@ bool RegexStr::operator==(const RegexStr >+ >+ bool RegexStr::matches(const std::string& str) const >+ { >+- return std::regex_match(str, regex_); >++ if (source_.empty()) { >++ return false; >++ } else { >++ return std::regex_match(str, regex_); >++ } >+ } >+ >+ template<> RegexStr Converter<RegexStr>::parse(const std::string& source) { > >Property changes on: files/patch-src_regexstr.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
uzsolt
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 245690
:
213596
| 213597