Security

The C3D file format allows any application to store a large number of parameters within a C3D file, in a structure that provides a uniform access interface to the information.  This allows the user to perform read/write/modify operations on the parameter data with relative ease.  Unfortunately, uncontrolled editing of certain C3D file parameters can create a problem.

For example, a casual change to the value of the POINT:SCALE parameter would cause all the 3D data in the file to be incorrectly scaled.  Likewise a change to the value of ANALOG:USED (the number of analog channels contained within the C3D file) could render the C3D file unreadable to most software programs – the C3D file could appear to have a different amount of analog data than was actually contained in the file.

The C3D parameter definition deals with this issue by allowing parameters to be locked against unauthorized access.  This is accomplished by setting the first byte of the parameter header (the parameter length) to be negative (the absolute value remains unchanged).  All parameters that have a negative length are considered locked and should not be casually changed by the user.

Applications that allow the user to edit parameters should respect the locked status flag and either, refuse to change locked parameters, or restrict this feature to prevent an inexperienced user from damaging the integrity of the C3D file data.

Applications that create C3D files should make sure that they flag any parameters that they create appropriately.  Important parameters that can affect the data integrity (i.e. the POINT parameters DATA_START and SCALE etc.) must be flagged as locked so that any user editing the C3D file with another application will be warned before they can do any serious damage.