{"thread":{"id":"9117","subject":"[PATCH 2/2] builtin-tag: fix uninitialized variables","startedAt":"2007-07-20T12:07:27Z","lastAt":"2007-07-20T12:07:27Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"47959","messageId":"Pine.LNX.4.64.0707201306340.14781@racer.site","threadId":"9117","inReplyTo":null,"subject":"[PATCH 2/2] builtin-tag: fix uninitialized variables","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-20T12:07:27Z","receivedAt":"2007-07-20T12:07:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThe function launch_editor() expects the variables 'buffer' and 'size'\nto be initialized, either to an existing buffer, or to NULL and 0.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\tThis is only called 2/2, because I found this error by testing \n\t1/2...\n\n builtin-tag.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-tag.c b/builtin-tag.c\nindex cf36def..81d37ce 100644\n--- a/builtin-tag.c\n+++ b/builtin-tag.c\n@@ -253,9 +253,9 @@ static void create_tag(const unsigned char *object, const char *tag,\n \t\t       char *message, int sign, unsigned char *result)\n {\n \tenum object_type type;\n-\tchar header_buf[1024], *buffer;\n+\tchar header_buf[1024], *buffer = NULL;\n \tint header_len, max_size;\n-\tunsigned long size;\n+\tunsigned long size = 0;\n \n \ttype = sha1_object_info(object, NULL);\n \tif (type <= 0)\n-- \n1.5.3.rc1.16.g9d6f-dirty\n"}]}