VirtualBox

Ignore:
Timestamp:
Feb 5, 2025 11:02:20 AM (4 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167344
Message:

VBoxDTrace: Address some Solaris-specific Parfait concerns in the CTF
code and libdtrace by pulling in the fixes from upstream (S11.4).
bugref:3409

File:
1 edited

Legend:

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

    r53657 r108064  
    242242
    243243                        ctf_file_t *rfp = fp;
     244                        const char *name;
    244245                        const ctf_type_t *tp =
    245246                            ctf_lookup_by_id(&rfp, cdp->cd_type);
    246                         const char *name = ctf_strptr(rfp, tp->ctt_name);
     247
     248                        if (tp == NULL) {
     249                                return (-1); /* errno is set for us */
     250                        }
     251
     252                        name = ctf_strptr(rfp, tp->ctt_name);
    247253
    248254                        if (k != CTF_K_POINTER && k != CTF_K_ARRAY)
     
    312318{
    313319        ssize_t rv = ctf_type_lname(fp, type, buf, len);
    314         return (rv >= 0 && VBDTCAST(size_t)rv < len ? buf : NULL);
     320        return ((rv >= 0 && (size_t)rv < len) ? buf : NULL);
    315321}
    316322
     
    408414                        for (; n != 0; n--, mp++) {
    409415                                ssize_t am = ctf_type_align(fp, mp->ctm_type);
    410                                 align = MAX(VBDTCAST(ssize_t)align, am);
     416                                if (am == -1) {
     417                                        return (-1); /* errno is set for us */
     418                                }
     419                                align = MAX(align, (size_t)am);
    411420                        }
    412421                } else {
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