Report
tar device density option uses fixed stack buffer with strcpy/sprintf
e957f46a-fad8-4d01-aebc-7d8f41bf96c0
GNU tar's option parser has a [REDACTED] path for -[0-7][lmh] density arguments. It stores the synthesized device name in a fixed-size stack buffer, copies the prefix with strcpy, and appends the numeric suffix with sprintf without checking the remaining capacity. That makes the path sensitive to build-time prefix length and formatted suffix expansion.