pp.c: Guard against malformed UTF-8 input in ord()
authorKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 16:49:04 +0000 (09:49 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 18:50:37 +0000 (11:50 -0700)
commit4f6386b6c255e97472036daac543efef3399b495
tree0baa0596434dcd26f73f7621e119b8ec2e82afbc
parent6e89a33a76ad97097e5b456387f1289b6addf741
pp.c: Guard against malformed UTF-8 input in ord()

This code got the actual length of the input scalar, but discarded it.
If that scalar contains malformed UTF-8 that has fewer bytes than is
indicated, a read beyond-buffer-end could happen.  Simply use the actual
length.
pp.c