зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1161666 - |extract_signature| leaks memory if |sigIndex| > 0 (command line build utility). Free allocated memory while skipping signatures. r=rstrong
This commit is contained in:
Родитель
33c3c7354c
Коммит
d7907499a5
|
@ -533,6 +533,9 @@ extract_signature(const char *src, uint32_t sigIndex, const char * dest)
|
|||
|
||||
/* Skip to the correct signature */
|
||||
for (i = 0; i <= sigIndex; i++) {
|
||||
/* Avoid leaking while skipping signatures */
|
||||
free(extractedSignature);
|
||||
|
||||
/* skip past the signature algorithm ID */
|
||||
if (fseeko(fpSrc, sizeof(uint32_t), SEEK_CUR)) {
|
||||
fprintf(stderr, "ERROR: Could not seek past sig algorithm ID.\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче