Thread (1 message) 1 message, 1 author, 2018-11-06

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

flat view

From: Junio C Hamano <hidden>
Date: 2018-11-06 01:48:19

Anders Waldenborg [off-list ref] writes:
AFAICU strbuf_expand doesn't suffer from the worst things that printf(3)
suffers from wrt untrusted format string (i.e no printf style %n which
can write to memory, and no vaargs on stack which allows leaking random
stuff).

The separator option is part of the full format string. If a malicious
user can specify that, they can't really do anything new, as the
separator only can expand %n and %xNN, which they already can do in the
full string.

But maybe I'm missing something?
I just wanted to make sure somebody thought it through (and hoped
that that somebody might be you).  I do not offhand see a readily
usable exploit vector myself.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help