Wireshark-commits: [Wireshark-commits] master 7a7d162: Don't pick up junk from an unset error-numbe
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7a7d162a494e3ccf15f58f1d710dcf645cfa02b1
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
7a7d162 by Guy Harris (guy@xxxxxxxxxxxx):
Don't pick up junk from an unset error-number variable.
Keep the actual error code and pointer-to-error-string in the scanner
state, rather than pointers to the variables passed in to us.
Initialize them to 0 and NULL, respectively.
That way, when the actual scanner routine returns, we don't check for an
error by looking at the error variable pointed to by our argument, which
might not have been set by the scanner and might have stack junk in it,
we look at a structure member we set to 0 before the scan.
Bug: 12903
Change-Id: I5a382da569a226e60c3c2a47f3a1515b0490c31d
Reviewed-on: https://code.wireshark.org/review/17716
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from acb68ae cli: use ws_strtou function.
adds 7a7d162 Don't pick up junk from an unset error-number variable.
Summary of changes:
wiretap/k12text.l | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)