Avoid using strdup inside library. (#488)
authorSebastian Rasmussen <sebras@gmail.com>
Mon, 29 May 2017 17:53:30 +0000 (12:53 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 29 May 2017 17:53:30 +0000 (10:53 -0700)
commit92e2c4baafa0401cb8d7dd2bbd70acfaeaf2aabf
treee40aa8c23ad7cb9bc635f549d4b26178befc669a
parent06cfe3f7369684fc05fa16da7f6778350f8bcba5
Avoid using strdup inside library. (#488)

If an application provides a malloc replacement through
hb_malloc_impl() it is important that it is used to allocate
everything, but the use of strdup() circumvents this and
causes system malloc() to be called instead. This pairs
badly with the custom hb_free_impl() being called later.
src/hb-common.cc
src/hb-private.hh