I was investigating a bug in the Go toolchain's fork of ar(1), called gopack, and I discovered two similar bugs in native ar. 1. With a __.SYMDEF file of size (2*n)+1 bytes, the size given in the header will incorrectly include the padding byte. 2. When writing an archive member file to disk, the odd-size check occurs before the write which will access one byte past the end of the buffer containing the member data. The solution for both errors is to check for an odd size after the write, not before. A patch is attached. I also modified the code to properly insert a newline character between archive members when necessary, in accordance with the ar(6) man page. Anthony