Changeset 78076 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py
- Timestamp:
- Apr 10, 2019 11:20:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py
r71487 r78076 170 170 print("{") 171 171 172 # Verify that the provided buffer length is what we expect. 173 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}"); 179 172 180 vector_func = apiutil.VectorFunction(func_name) 173 181 if (vector_func and len(apiutil.Parameters(vector_func)) == 1): … … 175 183 else: 176 184 MakeNormalCall( return_type, func_name, params ) 177 packet_length = apiutil.PacketLength( params )178 185 if packet_length == 0: 179 186 print("\tINCR_DATA_PTR_NO_ARGS( );") … … 330 337 print('static void crUnpackExtend%s(void)' % func_name) 331 338 print('{') 339 340 # Verify that the provided buffer length is what we expect. 341 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}"); 347 332 348 MakeNormalCall( return_type, func_name, params, 8 ) 333 349 print('}\n')
Note:
See TracChangeset
for help on using the changeset viewer.