fix pack-object buffer size
The input line has 40 _chars_ of sha1 and no 20 _bytes_. It should also account for the space before the pathname, and the terminating \n and \0. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Apr 20, 2006 at 17:25 UTC
0dec30b9788b12fdae5d5b69fc366a28bb688d80
1 file changed
+1
-1
pack-objects.c
+1
-1
@@ -1231,7 +1231,7 @@ static void setup_progress_signal(void)
1231
int main(int argc, char **argv)
1232
{
1233
SHA_CTX ctx;
1234
- char line[PATH_MAX + 20];
1234
+ char line[40 + 1 + PATH_MAX + 2];
1235
int window = 10, depth = 10, pack_to_stdout = 0;
1236
struct object_entry **list;
1237
int num_preferred_base = 0;