Skip to content

Commit 3627ab3

Browse files
committed
Fix wrong variable was used in the loop. Causing potential memory leaks.
Issue found by Code scanning: https://github.com/syoyo/tinyexr/security/code-scanning/105
1 parent fc39449 commit 3627ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tinyexr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8638,7 +8638,7 @@ int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers,
86388638
if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) {
86398639

86408640
// Free malloc-allocated memory here.
8641-
for (size_t k = 0; k < infos[i].attributes.size(); i++) {
8641+
for (size_t k = 0; k < infos[i].attributes.size(); k++) {
86428642
if (infos[i].attributes[k].value) {
86438643
free(infos[i].attributes[k].value);
86448644
}

0 commit comments

Comments
 (0)