{"push_id":1193938590,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"2e7a3237a1bab8414c7a9b8b3fad1f7585551721","before":"54d7b32e050410363a31b9fddab4584cc837f3a8","commits":[{"sha":"2e7a3237a1bab8414c7a9b8b3fad1f7585551721","author":{"name":"Øyvind A. Holm","email":"f15e6251203b5d9b3d10237fed78194ede9386c8@sunbase.org"},"message":"Make it handle corrupted log files correctly + refactor, 244 ok\n\nFix some undefined behaviour if the log file is corrupted in some way,\nand refactor the functions in logfile.c that takes care of opening the\nlog file.\n\nMake sure it handles this correctly:\n\n  - iIf the log file had a corrupted last line, i.e., it wasn't\n    \"</suuids>\\n\", it didn't write the new entry on its own line, but\n    overwrote the terminating \\n of the corrupt line.\n  - If the log file was shorter than 10 bytes, it couldn't fseek() 10\n    bytes from the end, and aborted with EINVAL.\n  - If the log file is empty, initialise it with a new XML header\n    instead of aborting with EINVAL because of the fseek() failure.\n\nAlso, move log init code from open_logfile() into these new functions:\n\n  - write_xml_header();\n  - seek_to_eof()\n  - unknown_end_line()\n  - check_last_log_line()\n  - seek_to_entry_pos()\n\n0a0769d4-44ca-11e6-a365-47955e9ff162","distinct":true,"url":"https://api.github.com/repos/sunny256/suuid/commits/2e7a3237a1bab8414c7a9b8b3fad1f7585551721"}]}
{"actor":{"display_login":"sunny256"}}