Check index range before using it

Found buy coverity
Fix memory leaks on invalid LANG

if there are multiple underscores ("_"), lang will be leaked; if there
are multiple dots ("."), territory will be leaked
Shut off coverity complains on uninitialized variables
Shut off coverity complain about uninitialized variables

DS_ARGC > 1 can't be false
Make sure string is null terminated

COPY_BYTE might not terminate the string if the max size is the same as
the buffer size
Shut off a coverity complain about the unintialized var
Shut off coverity about uninitialized var "padding"
Do not assume I64 to be the same as REBI64
Fix a memory leak

Found by coverity
Fix a memory leak

Found by coverity
Fix unitialized var

Found by coverity
Close the serial port on error

Fix a handle leak. Found by coverity
Travis CI integeration with coverity
Correct secure string in travis
Update travis
Update travis
Update build.sh
Merge branch 'atronix' into coverity_scan