Skip to content
Permalink
Browse files
Added checking for nullptr
  • Loading branch information
Midren committed Jun 17, 2020
1 parent 0c0accd commit 6d2c408058a0b301517438e1e3052c0de28d88e7
Showing 1 changed file with 3 additions and 1 deletion.
@@ -550,7 +550,9 @@ ErrCode_t msgRecoveryDeviceImpl(RecoveryDevice *msg, ErrCode_t (*funcConfirmReco
}
}
char current_label[DEVICE_LABEL_SIZE];
strncpy(current_label, storage_getLabel(), sizeof(current_label));
const char *label = storage_getLabel();
if (label != NULL)
strncpy(current_label, label, sizeof(current_label));

recovery_init(
msg->has_word_count ? msg->word_count : 12,

0 comments on commit 6d2c408

Please sign in to comment.