VirtualBox

Ignore:
Timestamp:
Apr 10, 2019 12:48:21 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129942
Message:

GuestHost/OpenGL,HostServices/SharedOpenGL: More Windows build fixes

Location:
trunk/src/VBox/HostServices/SharedOpenGL/unpacker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py

    r78076 r78086  
    172172    # Verify that the provided buffer length is what we expect.
    173173    packet_length = apiutil.PacketLength( params )
    174     print("\tif(!DATA_POINTER_CHECK(%d))" % packet_length);
    175     print("\t{");
    176     print("\t\tcrError(\"crUnpack%s: parameters out of range\");" % func_name);
    177     print("\t\treturn;");
    178     print("\t}");
     174    if packet_length > 0:
     175        print("\tif(!DATA_POINTER_CHECK(%d))" % packet_length);
     176        print("\t{");
     177        print("\t\tcrError(\"crUnpack%s: parameters out of range\");" % func_name);
     178        print("\t\treturn;");
     179        print("\t}");
    179180
    180181    vector_func = apiutil.VectorFunction(func_name)
     
    340341            # Verify that the provided buffer length is what we expect.
    341342            packet_length = apiutil.PacketLength( params )
    342             print("\tif(!DATA_POINTER_CHECK(%d))" % packet_length);
    343             print("\t{");
    344             print("\t\tcrError(\"crUnpack%s: parameters out of range\");" % func_name);
    345             print("\t\treturn;");
    346             print("\t}");
     343            if packet_length > 0:
     344                print("\tif(!DATA_POINTER_CHECK(%d))" % packet_length);
     345                print("\t{");
     346                print("\t\tcrError(\"crUnpack%s: parameters out of range\");" % func_name);
     347                print("\t\treturn;");
     348                print("\t}");
    347349
    348350            MakeNormalCall( return_type, func_name, params, 8 )
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_extend.py

    r69390 r78086  
    1818#define UNPACK_EXTEND_H 1
    1919
     20#ifdef __cplusplus
     21extern "C" {
     22#endif
     23
    2024""")
    2125
     
    3135
    3236print("""
     37#ifdef __cplusplus
     38}
     39#endif
     40
    3341#endif
    3442""")
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