irungentoo/ProjectTox-Core — pull request #645 by FullName (2013-11-11 14:35:18+00:00)
Title: nTox: enforce friend name null termination, reduce memory loss, allow nickchange as oldname=>newname

nTox.c:
- multiple places: tox_getname() doesn't terminate the string, make sure nTox does
- format_message():
. - renamed to print_formatted_message()
. - changed semantics: does the new_line() itself, saves caller from freeing the buffer (which no caller did)
. - changed signature: now also prints the friend's name when sending
. - intern: date is only printed once, the message line gets only time
- print_message(): enforce null termination
- main():
. - setlocale() to init locale (for date/time printing)
. - own name: ensure null termination

Messenger.c:
- notify of friend name change *before* the old name is overwritten