ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Kuznetsov <stku...@gmail.com>
Subject Assertions as binary data validation checks in deserialization
Date Thu, 27 Jul 2017 15:54:18 GMT
Hi Igniters,

While examining BinaryObjectImpl code I found this curious line in typeId()

  assert arr[off] == GridBinaryMarshaller.STRING : arr[off];

Is it OK to check external binary data with assertions?
I think it can lead to undefined behaviour on corrupt data from the wire.

Best regards,
  Andrey Kuznetsov.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message