Wireshark-commits: [Wireshark-commits] master-2.2 3a1f272: Don't pick up junk from an unset error-n

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 16 Sep 2016 01:33:59 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3a1f272a733eddfe1da3b75593a7ced966c9982a
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

3a1f272 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.
    
    Change-Id: I81a4fd6d5cf5e56f5638fae1253c48dc50c9c36d
    Reviewed-on: https://code.wireshark.org/review/17721
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 1158576622d677884a3ce4aa169873d453897c9d)
    Reviewed-on: https://code.wireshark.org/review/17722
    

Actions performed:

    from  e4e12df   Don't pick up junk from an unset error-number variable.
    adds  3a1f272   Don't pick up junk from an unset error-number variable.


Summary of changes:
 wiretap/ascend-int.h     |    4 ++--
 wiretap/ascend.y         |   10 +++++++---
 wiretap/ascend_scanner.l |    8 ++++----
 3 files changed, 13 insertions(+), 9 deletions(-)