Merge branch '1433-illegal-characters' into 'master'

Handle illegal byte sequences safely in BdfReaderImpl

Closes #1433

See merge request briar/briar!967
This commit is contained in:
akwizgran
2018-10-30 13:58:36 +00:00
4 changed files with 67 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ public class StringUtils {
try {
return s.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
throw new AssertionError(e);
}
}
@@ -63,7 +63,7 @@ public class StringUtils {
try {
return decoder.decode(buffer).toString();
} catch (CharacterCodingException e) {
throw new RuntimeException(e);
throw new AssertionError(e);
}
}