Wireshark-commits: [Wireshark-commits] master f1751ef: checkhf: handle C++-style comments
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f1751ef22fc9877e59fad3b1c60826bff8569d94
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
f1751ef by Peter Wu (peter@xxxxxxxxxxxxx):
checkhf: handle C++-style comments
"tools/checkhf.pl epan/dissectors/packet-umts_fp.c" gave this error:
Complex regular subexpression recursion limit (32766) exceeded at tools/checkhf.pl line 273.
This is caused by the comment "// ... Indicator's ..." which failed to
match the single-quoted string and caused "catastrophic backtracking".
Solution to fix this case is to disallow unescaped newlines (add "\n" to
the negated character class). Additionally, add logic to remove
C++-style comments for completeness.
Tested against all epan/dissectors/packet-*.c files, the only difference
in output is this umts_fp case, the running time has not regressed.
Change-Id: I7b43e01e1580acf831c0485513135b613bb02e8b
Reported-by: Joerg Mayer
Reviewed-on: https://code.wireshark.org/review/20965
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from 6d204e5 ANCP: Update to RFC6320
adds f1751ef checkhf: handle C++-style comments
Summary of changes:
tools/checkhf.pl | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)