1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
|
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1185
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
|