summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ac749c)
raw | patch | inline | side by side (parent: 7ac749c)
author | Jochen Voss <voss@seehuhn.de> | |
Sat, 28 Jun 2008 16:04:24 +0000 (17:04 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Jun 2008 20:43:21 +0000 (13:43 -0700) |
Make sure that buf has enough space to store the trailing \0 of
the command line argument, too.
Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the command line argument, too.
Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-upload-archive.c | patch | blob | history |
index 48ae09e9b5268ce1f11cfba433680a147ca39f7e..371400d49a5ff9f6ce297d7af07eb3fd6426c9ee 100644 (file)
--- a/builtin-upload-archive.c
+++ b/builtin-upload-archive.c
if (argc != 2)
usage(upload_archive_usage);
- if (strlen(argv[1]) > sizeof(buf))
+ if (strlen(argv[1]) + 1 > sizeof(buf))
die("insanely long repository name");
strcpy(buf, argv[1]); /* enter-repo smudges its argument */