prevent out-of-bounds string access

... while entering a   *   star symbol format code and there's no fill
character following the * yet, for example  "xxx"*

(cherry picked from commit 839cc63e7d1b78c56e04bafb46037e898ce2c455)

more out-of-bounds string accesses

(cherry picked from commit 349c93e0f5c9f231b2ff6854fcb795ca5881ca2d)

Change-Id: I006f125ceefccba6a95ea033fd434d98e5d4f1c2
Reviewed-on: https://gerrit.libreoffice.org/10995
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>