Merge branch 'bugfix-NullDeref_in_util_mosc.c' of git://github.com/panava/mosquitto into panava-bugfix-NullDeref_in_util_mosc.c

pull/1586/head
Roger A. Light 6 years ago
commit 89b55094c0

@ -160,6 +160,9 @@ int mosquitto__hex2bin_sha1(const char *hex, unsigned char **bin)
}
sha = mosquitto__malloc(SHA_DIGEST_LENGTH);
if(!sha){
return MOSQ_ERR_NOMEM;
}
memcpy(sha, tmp, SHA_DIGEST_LENGTH);
*bin = sha;
return MOSQ_ERR_SUCCESS;
@ -379,4 +382,3 @@ enum mosquitto_client_state mosquitto__get_state(struct mosquitto *mosq)
return state;
}

Loading…
Cancel
Save