The line at https://github.com/rapid7/ruby_smb/blob/master/lib/ruby_smb/fscc/file_information/file_both_directory_information.rb#L22 defines ShortNameLength as an unsigned 8 bit integer. According to the definitions at https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/270df317-9ba5-4ccb-ba00-8d22be139bc5, this should actually be a signed 8 bit integer.