summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-10-26 22:24:44 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-10-26 22:24:44 -0700
commit356af64d84076baaf90b0bf8adb7245771264e5a (patch)
tree008ecc6fdb6323d2bac3e09be6dce5b0de5f64cb /cache.h
parentMerge branch 'maint' (diff)
parentFix potentially dangerous uses of mkpath and git_path (diff)
downloadtgif-356af64d84076baaf90b0bf8adb7245771264e5a.tar.xz
Merge branch 'ar/maint-mksnpath' into HEAD
* ar/maint-mksnpath: Fix potentially dangerous uses of mkpath and git_path Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c Add mksnpath which allows you to specify the output buffer
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index b0edbf9b9f..629cdf3971 100644
--- a/cache.h
+++ b/cache.h
@@ -495,6 +495,9 @@ extern int check_repository_format(void);
#define DATA_CHANGED 0x0020
#define TYPE_CHANGED 0x0040
+extern char *mksnpath(char *buf, size_t n, const char *fmt, ...)
+ __attribute__((format (printf, 3, 4)));
+
/* Return a statically allocated filename matching the sha1 signature */
extern char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
extern char *git_path(const char *fmt, ...) __attribute__((format (printf, 1, 2)));