diff --git a/module.json b/module.json index 93b3ec2439..7af482c764 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { "name": "coap-service", - "version": "1.0.1", + "version": "1.0.2", "description": "CoAP Service library", "keywords": [ "coap", diff --git a/source/coap_security_handler.c b/source/coap_security_handler.c index f23110eae7..fd03b1537a 100644 --- a/source/coap_security_handler.c +++ b/source/coap_security_handler.c @@ -395,7 +395,7 @@ int entropy_poll( void *ctx, unsigned char *output, size_t len, } memset(c, 0, len); for(uint16_t i=0; i < len; i++){ - *(c + 1) = (char)randLIB_get_8bit(); + *(c + i) = (char)randLIB_get_8bit(); } memmove(output, c, len); *olen = len;