Use "segment length" field to delimit end of name

The unused bytes in the string of the "Device name" command
have unspecified value. There is no guarantee these bytes are
set to 0. We found at least one device which displayed garbage
when printing the device name without using the "segment length".
Merge pull request #1 from ouah/master

Use "segment length" field to delimit end of name