]> granicus.if.org Git - graphviz/commit
remove temporary buffer for name of the GVC plugin being loaded
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 29 May 2021 20:47:55 +0000 (13:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Jun 2021 01:56:44 +0000 (18:56 -0700)
commit832b5a9d3dc143baa1a3e85d3dd58839fde95d54
tree02d5fcc9dd021512c2cca755cde1e545a1265290
parentb7ab287ae8b4b0fd78525b87094ef1f33045888c
remove temporary buffer for name of the GVC plugin being loaded

The GVC plugin loading machinery copied the first 63 characters of the plugin
name to a temporary buffer in order to mutate it. However the mutation is simply
chopping up the plugin name based on a ':' separator. By tracking the start and
end of each component as pointers into the original sting, we can remove the
need for this temporary buffer.

Though this saves some stack memory, the primary motivation for this change is
to remove the truncation-to-63-characters behavior. There is no need to limit
plugin names to 63 characters. Note that the names of registered plugins are
still limited to 63 characters, so this does not fully remove the restriction.
lib/gvc/gvplugin.c