]> granicus.if.org Git - graphviz/commit
swap sprintf for snprintf where straightforward
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Mar 2021 23:35:39 +0000 (15:35 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Mar 2021 03:48:27 +0000 (20:48 -0700)
commitf43db5e2293618361ca39ddf19dd8bc4384a5ee9
treea0c1a12147561f9406af46dee66c5c67e6549c40
parentf7aec86b7bc0353759e4ad1cf65278ae5fe54624
swap sprintf for snprintf where straightforward

sprintf has consistently been in the top ten root causes of vulnerabilities in
low level applications and is generally considered unsafe for any use in modern
code bases. This commit removes the instances of it that are straightforward to
convert to snprintf. Related to #1950.
61 files changed:
cmd/dot/dot.c
cmd/dotty/mswin32/dotty.c
cmd/lefty/common.c
cmd/lefty/dot2l/dot2l.c
cmd/lefty/gfxview.c
cmd/lefty/internal.c
cmd/lefty/os/unix/io.c
cmd/lneato/mswin32/lneato.c
cmd/smyrna/gui/frmobjectui.c
cmd/smyrna/gui/topviewsettings.c
cmd/smyrna/gvprpipe.c
cmd/smyrna/viewport.c
cmd/smyrna/viewportcamera.c
cmd/tools/dijkstra.c
cmd/tools/gmlparse.y
cmd/tools/graphml2gv.c
cmd/tools/gv2gxl.c
cmd/tools/gvcolor.c
cmd/tools/gvpack.c
cmd/tools/gxl2gv.c
cmd/tools/mmio.c
cmd/tools/sccmap.c
doc/libgraph/sccmap.c
lib/circogen/blockpath.c
lib/circogen/blocktree.c
lib/circogen/circular.c
lib/common/colxlate.c
lib/common/diagen.c
lib/common/htmltable.c
lib/common/ns.c
lib/common/output.c
lib/common/picgen.c
lib/common/postproc.c
lib/common/routespl.c
lib/common/splines.c
lib/dotgen/dotinit.c
lib/dotgen/fastgr.c
lib/dotgen/mincross.c
lib/dotgen/rank.c
lib/fdpgen/comp.c
lib/gvc/gvc.c
lib/gvc/gvdevice.c
lib/gvpr/actions.c
lib/gvpr/compile.c
lib/inkpot/data/xcolors.c
lib/inkpot/inkpot_scheme.c
lib/neatogen/constraint.c
lib/neatogen/multispline.c
lib/neatogen/neatoinit.c
lib/patchwork/patchwork.c
lib/sfdpgen/post_process.c
lib/sfdpgen/spring_electrical.c
lib/sparse/DotIO.c
plugin/core/gvrender_core_dia.c
plugin/core/gvrender_core_dot.c
plugin/gs/gvloadimage_gs.c
tclpkg/gdtclft/gdtclft.c
tclpkg/tcldot/tcldot-util.c
tclpkg/tclpathplan/tclpathplan.c
tclpkg/tkspline/tkspline.c
tests/unit_tests/lib/common/command_line.c