Skip to content

Commit

Permalink
Merge pull request #933 from /issues/932-coverity-npe
Browse files Browse the repository at this point in the history
Fix #932: Coverity: Dereference null return value
  • Loading branch information
banterCZ authored Jul 18, 2023
2 parents 97d2691 + f3b2107 commit e5894f6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public static SdkConfiguration deserialize(String serialized) {
final byte[] serializedBytes = Base64.getDecoder().decode(serialized);
final SdkDataReader reader = new SdkDataReader(serializedBytes);
final Byte version = reader.readByte();
if (version != SDK_CONFIGURATION_VERSION) {
// Unexpected SDK configuration version
if (version == null || version != SDK_CONFIGURATION_VERSION) {
logger.warn("Unexpected SDK configuration version: {}", version);
return null;
}
final byte[] appKey = reader.readData(16);
Expand Down

0 comments on commit e5894f6

Please sign in to comment.