]> granicus.if.org Git - graphviz/commit
eval: avoid sfprintf in integer-to-string static
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Jul 2021 02:24:48 +0000 (19:24 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Aug 2021 01:37:02 +0000 (18:37 -0700)
commit0e02771f45e9d1168db8091f5be066a20a8136a0
treef5c11d7932193ad64516a443821ea9762e7b945c
parent676acbab0dd00b3d5b6c4d683bdaaa1bac5d4beb
eval: avoid sfprintf in integer-to-string static

Instead of constructing a string in the `tmp` buffer and then eventually
allocating vmalloc space to copy this into, we can simply compute the number of
bytes in advance, allocate vmalloc space, and then directly emit the output into
the vmalloc buffer. Related to #1873, #1998.
lib/expr/exeval.c