mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'master' of https://github.com/beemaster/toxcore
This commit is contained in:
commit
2cafa4a089
|
@ -131,7 +131,7 @@ Tox *tox_new(const struct Tox_Options *options, const uint8_t *data, size_t leng
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (data) {
|
||||
if (data && length) {
|
||||
if (length < TOX_ENC_SAVE_MAGIC_LENGTH) {
|
||||
SET_ERROR_PARAMETER(error, TOX_ERR_NEW_LOAD_BAD_FORMAT);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user