jamesdbrock / hffix

Financial Information Exchange Protocol C++ Library
http://jamesdbrock.github.io/hffix
Other
276 stars 89 forks source link

add bounds checking to message_writer #11

Closed arvidn closed 6 years ago

arvidn commented 6 years ago

throw exception if a message would exceed the size of the buffer passed in to the message_writer constructor

arvidn commented 6 years ago

I can see improving the performance of this patch by having fewer checks of upper bounds of lengths instead. But I think correctness (having checks) trumps fast and incorrect (not having checks)

jamesdbrock commented 6 years ago

reading...

jamesdbrock commented 6 years ago

This is really nice @arvidn , thanks! I'm planning to merge it but I'm doing some minor fussing with it first. I have to log off for the night, but here's my work-in-progress: https://github.com/jamesdbrock/hffix/tree/arvidn-message-writer-bounds-checking