author | Christian Couder <chriscool@tuxfamily.org> | |
Mon, 11 Sep 2006 05:04:50 +0000 (07:04 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 11 Sep 2006 05:48:11 +0000 (22:48 -0700) | ||
commit | 0f503d77ac9032fbfbd5f3bacafeccbcf408b31f | |
tree | 7428786361776611ed66c194181f95ea0e41967b | tree | snapshot |
parent | 86257aa324d04694408ad806989690979456f29a | commit | diff |
Fix a memory leak in "connect.c" and die if command too long.
Use "add_to_string" instead of "sq_quote" and "snprintf", so
that there is no memory allocation and no memory leak.
Also check if the command is too long to fit into the buffer
and die if this is the case, instead of truncating it to the
buffer size.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Use "add_to_string" instead of "sq_quote" and "snprintf", so
that there is no memory allocation and no memory leak.
Also check if the command is too long to fit into the buffer
and die if this is the case, instead of truncating it to the
buffer size.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
connect.c | diff | blob | history |