Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read VPF header generate Exception #263

Open
GogoTrash opened this issue Apr 13, 2023 · 0 comments
Open

Read VPF header generate Exception #263

GogoTrash opened this issue Apr 13, 2023 · 0 comments

Comments

@GogoTrash
Copy link

When I try to read a VPF header with an empty narrative table name, it generates a StringIndexOutOfBoundsException in the VPFTableReader because it's empty at the line 200 (in the readHeader(ByteBuffer) method):

...
// Read the narrative table name.
s = VPFUtils.readDelimitedText(buffer, ';'); // <= Return an empty String
if (s != null && s.charAt(0) != '-') //<= And here s.charAt(0) return a StringIndexOutOfBoundsException
      header.narrativeTableName = s.trim();
...

I think if we add a condition if !s.isEmpty() it could resolve the problem.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant