Code Monkey home page Code Monkey logo

Comments (4)

babelouest avatar babelouest commented on June 14, 2024

Thanks,

this should be fixed in e458353 , can you check it again?

from ulfius.

ShangzhiXu avatar ShangzhiXu commented on June 14, 2024

Hi, thanks for your reply!
But I think it has not been fixed completely, maybe I didn't explain the issue clearly, sorry for that : )

What I think of the issue is:
At line 1689 in ulfius.c, u_map_init(u_instance->default_headers); will be called, in this function, u_instance->default_headers->keys might be freed [u_map.c, line 45].

Then, at line 1701 in ulfius.c, there is a possibility thatulfius_clean_instance(u_instance); will be called. This function, it will execute this trace:

u_map_clean_full(u_instance->default_headers)            [ulfius.c, line 1627] -> 
u_map_clean(u_map)                                       [u_map.c, line 82] -> 
o_free(u_map->keys)                                      [u_map.c, line 72]

In this case, u_instance->default_headers->keys will be freed again. May be it can be fixed by checking if u_map->keys == NULL before [u_map.c, line 72].

Have a good day~

from ulfius.

babelouest avatar babelouest commented on June 14, 2024

OK, I think I see now, I've added some u_map->keys = NULL; and al. in the functions u_map_clean and u_map_init in the last commit 0d4f7ab , can you verify it again please?

from ulfius.

ShangzhiXu avatar ShangzhiXu commented on June 14, 2024

I think it is fine now, so I'll close this issue, thanks for your cooperation!

from ulfius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.