otrv4 / libotr-ng

A new implementation of OTR with support for version 4. This is a mirror of https://bugs.otr.im/otrv4/libotr-ng
Other
43 stars 9 forks source link

Fix snprintf max size error #206

Closed lnsndn closed 5 years ago

lnsndn commented 5 years ago

Quick and simple fix for #205

I have verified that the tests go through on my machine.

@claucece On a related note: there are no checks in this function to verify that hash and human are of the required length. Perhaps this is somehow implied elsewhere throughout the lib? I haven't taken the time to go through everything well enough to understand where they come from and what guarantees exist that the user can't make those mistakes. Or if this is even an important function. This is just my drive-by coding, you of course know better :)

claucece commented 5 years ago

Hey @lnsndn !

Thanks so much. I will merge.

On a related note: there are no checks in this function to verify that hash and human are of the required length. Perhaps this is somehow implied elsewhere throughout the lib?

This is true. I'll add the proper checks ;)

Thanks so much!

lnsndn commented 5 years ago

Thank you, happy we could contribute!