Fix string index oob in octal escapes

Check for the end of string
fixes glib gscanner.h's G_CSET_LATINS and G_CSET_LATINC

https://github.com/codeanticode/gstreamer-1.x-java/issues/1