Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'bp/fsmonitor-bufsize-fix'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 25 Apr 2018 04:29:03 +0000
(13:29 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 25 Apr 2018 04:29:03 +0000
(13:29 +0900)
Fix an unexploitable (because the oversized contents are not under
attacker's control) buffer overflow.
* bp/fsmonitor-bufsize-fix:
fsmonitor: fix incorrect buffer size when printing version number
fsmonitor.c
patch
|
blob
|
history
raw
(from parent 1:
3a940e9
)
diff --git
a/fsmonitor.c
b/fsmonitor.c
index 6d7bcd5d0ed8f2d3f5abdea2f26c6be72909b657..eb4e6422562c89686f1bc9666b031a7ce7083a6e 100644
(file)
--- a/
fsmonitor.c
+++ b/
fsmonitor.c
@@
-104,7
+104,7
@@
static int query_fsmonitor(int version, uint64_t last_update, struct strbuf *que
if (!(argv[0] = core_fsmonitor))
return -1;
- snprintf(ver, sizeof(ver
sion
), "%d", version);
+ snprintf(ver, sizeof(ver), "%d", version);
snprintf(date, sizeof(date), "%" PRIuMAX, (uintmax_t)last_update);
argv[1] = ver;
argv[2] = date;