git: usr.sbin/makefs/hammer2: Avoid overlapped snprintf buffer
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Sat Jun 24 15:29:39 PDT 2023
commit 9a393dfb197bf13985cfa520ca1de7e134e9aa1e
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date: Sat Jun 24 21:59:07 2023 -0700
usr.sbin/makefs/hammer2: Avoid overlapped snprintf buffer
When "-o R" path argument contained symlink, the output path
was partly copying from/to the same buffer in stack. Use a
different buffer.
While here, move 64KB buffer for reading from stack to heap.
Summary of changes:
usr.sbin/makefs/hammer2.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9a393dfb197bf13985cfa520ca1de7e134e9aa1e
--
DragonFly BSD source repository
More information about the Commits
mailing list