]> granicus.if.org Git - libexpat/commit
xmlparse.c: Fix dangling pointer caused by use of realloc
authorSebastian Pipping <sebastian@pipping.org>
Sat, 15 Jul 2017 21:44:48 +0000 (23:44 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 20 Jul 2017 20:16:09 +0000 (22:16 +0200)
commit786d7abfcd7f901e4f9fb10bea45e5de99691057
treed0fd4d94b92a88cdf19ce436c95383ad1c210352
parentf48b24b454a7585d7bc4272fe3b07fb645f9df7f
xmlparse.c: Fix dangling pointer caused by use of realloc

Variables pool->ptr and pool->start point to addresses
that may have been freed if realloc chose the path of
a new base address.  So we do the math on these pointers
while they are not dangling, yet.

For a related article:
http://trust-in-soft.com/dangling-pointer-indeterminate/
expat/lib/xmlparse.c