1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
|
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1175
def sanitize_parameters!(obj_class, params)
obj_klass = obj_class
obj_klass = obj_class.superclass if obj_class.superclass.arg_processor == self
res = obj_class.superclass.arg_processor.sanitize_parameters!(obj_klass, params)
return res if obj_class.superclass.default_parameters[:byte_align]
return res if params[:referent_byte_align]
raise ArgumentError.new(
"NDR Pointers referent must have `:byte_align` parameter set. This "\
"makes sure the whole structure is correctly aligned. Use a predefined "\
"NDR element instead, or provide the `:referent_byte_align` parameter "\
"when defining the structure (Faulty pointer class: #{obj_class})"
)
end
|