[os_regex] define length of character maps

not sure, if this silences the coverity warnings
fix CID 28491
fix CID 28468
fix CID 28469
fix CID 28470
fix CID 28489
fix fix CID 28491
fix CID 28523
fix CID 28527
fix CID 28528
fix CID 28529
fix CID 28530
fix CID 28531
fix CID 28532
fix CID 28533
fix CID 28534
fix CID 28535
fix CID 28511
Merge pull request #341 from cgzones/coverity

fix several Coverity issues