Fix segfault when aesgcm url isn't the expected size

Fixes the bug mentioned in
https://github.com/profanity-im/profanity/issues/1478#issuecomment-794161606

The rest of https://github.com/profanity-im/profanity/issues/1478 I
can't reproduce. Seems to work fine.
This commit is contained in:
Michael Vetter
2021-06-30 12:27:11 +02:00
parent f30a9e1256
commit a46c4443e3
2 changed files with 2 additions and 0 deletions

View File

@@ -1862,6 +1862,7 @@ omemo_parse_aesgcm_url(const char* aesgcm_url,
}
if (strlen(*fragment) != AESGCM_URL_NONCE_LEN + AESGCM_URL_KEY_LEN) {
ret = 1;
goto out;
}