From: Matthew Barr Date: Wed, 23 Nov 2016 00:07:10 +0000 (+1100) Subject: hyperscan#41: ignore carriage-return in pattern files X-Git-Tag: v4.4.0^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83e69cc195b7677810bd7904561bb9e389baf514;p=thirdparty%2Fvectorscan.git hyperscan#41: ignore carriage-return in pattern files --- diff --git a/examples/patbench.cc b/examples/patbench.cc index 9c2b41fa..f82f47a7 100644 --- a/examples/patbench.cc +++ b/examples/patbench.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -833,6 +833,8 @@ static unsigned parseFlags(const string &flagsStr) { flags |= HS_FLAG_UTF8; break; case 'W': flags |= HS_FLAG_UCP; break; + case '\r': // stray carriage-return + break; default: cerr << "Unsupported flag \'" << c << "\'" << endl; exit(-1); diff --git a/examples/pcapscan.cc b/examples/pcapscan.cc index 032b19cd..12b94438 100644 --- a/examples/pcapscan.cc +++ b/examples/pcapscan.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -621,6 +621,8 @@ static unsigned parseFlags(const string &flagsStr) { flags |= HS_FLAG_UTF8; break; case 'W': flags |= HS_FLAG_UCP; break; + case '\r': // stray carriage-return + break; default: cerr << "Unsupported flag \'" << c << "\'" << endl; exit(-1);