VirtualBox

Ignore:
Timestamp:
Dec 4, 2015 3:21:52 PM (9 years ago)
Author:
vboxsync
Message:

ctf_lookup.c: Fixed read beyond end of string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_lookup.c

    r53657 r58990  
    136136                for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) {
    137137                        if (lp->ctl_prefix[0] == '\0' ||
     138#ifdef VBOX
     139                            (   strncmp(p, lp->ctl_prefix, (size_t)(q - p)) == 0
     140                             && lp->ctl_len <= (size_t)(q - p)) /* don't push 'p' to far and crash */ ) {
     141#else
    138142                            strncmp(p, lp->ctl_prefix, (size_t)(q - p)) == 0) {
     143#endif
    139144                                for (p += lp->ctl_len; isspace(*p); p++)
    140145                                        continue; /* skip prefix and next ws */
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