VirtualBox

Changeset 72843 in vbox for trunk/src/libs/xpcom18a4/nsprpub


Ignore:
Timestamp:
Jul 4, 2018 1:29:14 AM (6 years ago)
Author:
vboxsync
Message:

xpcom: range-check array index first, not after using it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prsystem.c

    r1 r72843  
    113113#ifndef _PR_GET_HOST_ADDR_AS_NAME
    114114        /* Return the unqualified hostname */
    115             while (buf[len] && (len < buflen)) {
     115            while ((len < buflen) && buf[len]) {
    116116                if (buf[len] == '.') {
    117117                    buf[len] = '\0';
Note: See TracChangeset for help on using the changeset viewer.

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