Commit 6b06d66c authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa
Browse files

Properly initialize GMatchInfo to 0L before parsing regular expression

This prevents crash when parsing the result later on, when the regexp matching has failed (for some reason) in the first place.

CCBUG: https://bugs.mageia.org/show_bug.cgi?id=10468
parent 81107fd4
......@@ -77,7 +77,7 @@ namespace Oxygen
"(?:(\\d+),(\\d+),(\\d+)(?:,(\\d+))?)",
G_REGEX_CASELESS, (GRegexMatchFlags)0, 0L );
GMatchInfo* matchInfo;
GMatchInfo* matchInfo(0L);
g_regex_match( regex, value.c_str(), (GRegexMatchFlags)0, &matchInfo);
const int matchCount( g_match_info_get_match_count( matchInfo ) );
if( matchCount == 2 )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment