{"shas":[["eae3ad5141e2c915f7e3ed2db1399d3071d357e6","b63915d52993222d942e3687419d5ec7864c80f4@gmail.com","amandad-src/amandad.c: use a constant to declare buffer size in recv_errfd()\n\nThe 'buf' local variable was declared to be 32769 bytes long, which is pretty\nmuch exactly NETWORK_BLOCK_SIZE + 1. Replace the hardcoded number with the\nlatter expression instead.","Francis Galiegue"],["5a223b2e1f9822de09acb9d38e26f6cfdc3863cd","b63915d52993222d942e3687419d5ec7864c80f4@gmail.com","amanda-src/amandad.c: fix 'buf' local variable handling in errfd_recv()\n\nTwo things:\n\n* we want to write to buf itself, not a pointer to it (even though Dustin says\n  it's \"one of the only cases where C is nice to the programmer\", let's stick to\n  standard practice);\n* if we have read n bytes and want to put a nul character after what we've read,\n  we should assign that nul character to buf[n], not buf[n+1].","Francis Galiegue"],["21ebcbf22c902c6a51951baccb78e7739ca4e251","b63915d52993222d942e3687419d5ec7864c80f4@gmail.com","amandad-src/amandad.c: handle reply buffer extension in only one place\n\nThe code to handle extensions of the \"repbuf\" field is duplicated in three\nplaces. Introduce the expand_reply_buffer() function to handle this instead. In\ncase the requested space is not enough, the space is doubled.\n\nThis function also handles empty buffers and will therefore allocate a new\nbuffer if needed. However, in this particular case, since the function relies on\nthe buffer size being declared as 0 and the ->repbuf being NULL, assert on these\ntwo conditions and ensure the correctness of values in service_delete().","Francis Galiegue"]],"repo":"fge/amanda","actor":"fge","ref":"refs/heads/misc","size":3,"head":"21ebcbf22c902c6a51951baccb78e7739ca4e251","actor_gravatar":"fd7fb5a87e5a604663949ecc643dc4a4","push_id":31313163}