Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak in parseSWF_EXPORTASSETS #239

Open
chluo1997 opened this issue Jul 23, 2022 · 0 comments
Open

memory leak in parseSWF_EXPORTASSETS #239

chluo1997 opened this issue Jul 23, 2022 · 0 comments

Comments

@chluo1997
Copy link

chluo1997 commented Jul 23, 2022

On libming latest version, a memory leak was found in function parseSWF_EXPORTASSETS.

=================================================================
==20018==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1990 byte(s) in 253 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ce100 in readBytes /home/users/chluo/libming/build/util/../../util/read.c:252:17

Direct leak of 512 byte(s) in 2 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ce422 in readString /home/users/chluo/libming/build/util/../../util/read.c:272:17

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x4993e9 in realloc (/home/users/chluo/libming/build/util/swftophp+0x4993e9)
    #1 0x5ce58c in readString /home/users/chluo/libming/build/util/../../util/read.c:290:21

Direct leak of 320 byte(s) in 4 object(s) allocated from:
    #0 0x499242 in calloc (/home/users/chluo/libming/build/util/swftophp+0x499242)
    #1 0x5aaf1c in parseSWF_DOACTION /home/users/chluo/libming/build/util/../../util/parser.c:2431:20

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5cf496 in readSizedString /home/users/chluo/libming/build/util/../../util/read.c:389:17

Direct leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ac181 in parseSWF_EXPORTASSETS /home/users/chluo/libming/build/util/../../util/parser.c:2482:32

Direct leak of 44 byte(s) in 1 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5a2057 in parseSWF_DEFINEFONTINFO2 /home/users/chluo/libming/build/util/../../util/parser.c:2062:34

Direct leak of 30 byte(s) in 1 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ac153 in parseSWF_EXPORTASSETS /home/users/chluo/libming/build/util/../../util/parser.c:2481:29

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x4993e9 in realloc (/home/users/chluo/libming/build/util/swftophp+0x4993e9)
    #1 0x5a804a in parseSWF_DEFINESPRITE /home/users/chluo/libming/build/util/../../util/parser.c:2312:5

Direct leak of 6 byte(s) in 1 object(s) allocated from:
    #0 0x4993e9 in realloc (/home/users/chluo/libming/build/util/swftophp+0x4993e9)
    #1 0x5a7f8c in parseSWF_DEFINESPRITE /home/users/chluo/libming/build/util/../../util/parser.c:2310:5

Indirect leak of 3840 byte(s) in 15 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ce422 in readString /home/users/chluo/libming/build/util/../../util/read.c:272:17

Indirect leak of 528 byte(s) in 2 object(s) allocated from:
    #0 0x499242 in calloc (/home/users/chluo/libming/build/util/swftophp+0x499242)
    #1 0x5a5002 in parseSWF_DEFINELOSSLESS2 /home/users/chluo/libming/build/util/../../util/parser.c:2159:3

Indirect leak of 264 byte(s) in 1 object(s) allocated from:
    #0 0x499242 in calloc (/home/users/chluo/libming/build/util/swftophp+0x499242)
    #1 0x5abc9b in parseSWF_END /home/users/chluo/libming/build/util/../../util/parser.c:2469:3

Indirect leak of 4 byte(s) in 2 object(s) allocated from:
    #0 0x4990cd in malloc (/home/users/chluo/libming/build/util/swftophp+0x4990cd)
    #1 0x5ce100 in readBytes /home/users/chluo/libming/build/util/../../util/read.c:252:17

SUMMARY: AddressSanitizer: 8450 byte(s) leaked in 286 allocation(s).

How to reproduce:
swftophp bug

bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant