mirror of
https://github.com/git/git.git
synced 2024-11-19 18:23:58 +01:00
896e4bfcec
buffer_read_binary is a thin wrapper around fread, but its signature is wrong: - fread can fill an arbitrary in-memory buffer. buffer_read_binary is limited to buffers whose size is representable by a 32-bit integer. - The result from fread is the number of bytes actually read. buffer_read_binary only reports the number of bytes read by incrementing sb->len by that amount and returns void. Fix both: let buffer_read_binary accept a size_t instead of uint32_t for the number of bytes to read and as a convenience return the number of bytes actually read. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> |
||
---|---|---|
.. | ||
fast_export.c | ||
fast_export.h | ||
LICENSE | ||
line_buffer.c | ||
line_buffer.h | ||
line_buffer.txt | ||
obj_pool.h | ||
repo_tree.c | ||
repo_tree.h | ||
sliding_window.c | ||
sliding_window.h | ||
string_pool.c | ||
string_pool.h | ||
string_pool.txt | ||
svndump.c | ||
svndump.h | ||
trp.h | ||
trp.txt |