зеркало из https://github.com/mozilla/pjs.git
Bugzilla Bug 345941: fixed the bug that we might pass uninitialized 'req'
to fclose(). r=glen.beasley. Thanks to Wolfgang Rosenauer <mozilla@rosenauer.org> for the bug report.
This commit is contained in:
Родитель
107e12ab56
Коммит
c9e31d8b88
|
@ -3088,7 +3088,7 @@ void hmac_test(char *reqfn)
|
|||
unsigned char HMAC[HASH_LENGTH_MAX]; /* computed HMAC */
|
||||
HASH_HashType hash_alg; /* HMAC type */
|
||||
|
||||
FILE *req; /* input stream from the REQUEST file */
|
||||
FILE *req = NULL; /* input stream from the REQUEST file */
|
||||
FILE *resp; /* output stream to the RESPONSE file */
|
||||
|
||||
buf = PORT_ZAlloc(bufSize);
|
||||
|
@ -3201,7 +3201,9 @@ void hmac_test(char *reqfn)
|
|||
}
|
||||
}
|
||||
loser:
|
||||
if (req) {
|
||||
fclose(req);
|
||||
}
|
||||
if (buf) {
|
||||
PORT_ZFree(buf, bufSize);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче