From: Justin Viiret Date: Wed, 5 Apr 2017 06:40:07 +0000 (+1000) Subject: rdfa_merge: sort esets before alphabet calc X-Git-Tag: v4.5.0^2~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eec2b8233dbd78552cd5a2ef689c75dc6e940e3d;p=thirdparty%2Fvectorscan.git rdfa_merge: sort esets before alphabet calc --- diff --git a/src/nfa/rdfa_merge.cpp b/src/nfa/rdfa_merge.cpp index 45457555..50e9b62a 100644 --- a/src/nfa/rdfa_merge.cpp +++ b/src/nfa/rdfa_merge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -40,6 +40,7 @@ #include "util/report_manager.h" #include "util/ue2_containers.h" +#include #include using namespace std; @@ -135,6 +136,10 @@ public: } } + // Sort so that our alphabet mapping isn't dependent on the order of + // rdfas passed in. + sort(esets.begin(), esets.end()); + alphasize = buildAlphabetFromEquivSets(esets, alpha, unalpha); }