]> granicus.if.org Git - graphviz/commit
extokens: fix missing NUL terminator append in GVPR tokenization
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 16 Oct 2021 20:52:57 +0000 (13:52 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 19 Oct 2021 14:46:14 +0000 (07:46 -0700)
commitccc3cf8b4a10cb14b052bc0bd0f2979546952de5
tree8e3a6c0d2ee032f882fca142ebd7ace98f42a039
parent742f5f4988d826223c6a8e165f11502a26b2ab83
extokens: fix missing NUL terminator append in GVPR tokenization

This is the second half of a bug fix following the prior commit.

Commit 971293551421455a0d939b9f8cea17356b7968f8 refactored this code to avoid
the use of an SFIO buffer, inadvertently introducing a bug. The change did not
account for the source buffer not being NUL terminated. This fix wicks closer to
the original code, not assuming a NUL terminator and copying a known number of
bytes into the destination.

Fixes #2138.
CHANGELOG.md
lib/expr/exeval.c
rtest/test_regression.py