VirtualBox

Ignore:
Timestamp:
Feb 14, 2012 2:43:39 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76255
Message:

NAT/libalias: initialization of iresult at the very begining, to avoid return uninitialized value on first getout goto.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias.c

    r39101 r40114  
    12471247    struct in_addr alias_addr;
    12481248    struct ip *pip;
     1249#ifndef VBOX
    12491250    int iresult;
     1251#else
     1252    /* vbox: we need initialize iresult from the very beginning to avoid
     1253     * returning of uninitiolized value on first getout. */
     1254    int iresult = PKT_ALIAS_IGNORED;
     1255#endif
    12501256
    12511257    if (la->packetAliasMode & PKT_ALIAS_REVERSE) {
     
    12671273    }
    12681274
     1275#ifndef VBOX
    12691276    iresult = PKT_ALIAS_IGNORED;
     1277#endif
    12701278    if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0) {
    12711279        switch (pip->ip_p) {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette