pivasoftware / easycwmp

EasyCwmp:
http://www.easycwmp.org/
GNU General Public License v2.0
73 stars 59 forks source link

I found new issue not to close file. #33

Open knlee opened 7 years ago

knlee commented 7 years ago

In digestauth.c, I found it and modified.

void http_digest_init_nonce_priv_key(void) { char *possible = STRING_POSSIBLE; int dev_random = open("/dev/urandom", O_RDONLY); if (dev_random > 0) { int result = read(dev_random, NONCE_PRIV_KEY, sizeof(NONCE_PRIV_KEY) - 1); if (result > 0) { for(i = 0; i < (sizeof(NONCE_PRIV_KEY) - 1); i++) { NONCE_PRIV_KEY[i] = possible[NONCE_PRIV_KEY[i] % (sizeof(STRING_POSSIBLE) - 1)]; } } close(dev_random); } }

pivasoftware commented 6 years ago

Please next time open the ticket in the official easycwmp.org website. I already opend ticket for that issue: http://support.easycwmp.org/view.php?id=289