Sync with upstream (var.c, 1.38):

"Fri Dec 20 17:53:09 2013 UTC
Fix a crash in ksh when trying to access ${12345678901234567890}

Input from deraadt@, millert@ and otto@.

okay from millert@ plus a willing from deraadt@"

/zhuk@/